# Federated cargo

**URL:** <https://internals.rust-lang.org/t/federated-cargo/8573>\
**Category:** Uncategorized\
**Created:** [October 16, 2018, 1:02am UTC](https://internals.rust-lang.org/t/federated-cargo/8573 "2018-10-16T01:02:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soni](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@Soni](https://internals.rust-lang.org/u/Soni)\
**Post date:** [October 16, 2018, 1:02am UTC](https://internals.rust-lang.org/t/federated-cargo/8573/1 "2018-10-16T01:02:34Z")

</div>

Cargo should support [foo@example.org](mailto:foo@example.org) dependencies, in addition to the default [foo@crates.io](mailto:foo@crates.io) dependencies. [Crates.io](http://Crates.io) should allow crates with [non-@crates.io](mailto:non-@crates.io) dependencies.

Y’know, so we all can have different opinions but still be on the same community.

---

<div class="post-metadata">

**Author:** ![sfackler](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/sfackler/32/9_2.png) [@sfackler](https://internals.rust-lang.org/u/sfackler)\
**Post date:** [October 16, 2018, 1:03am UTC](https://internals.rust-lang.org/t/federated-cargo/8573/2 "2018-10-16T01:03:18Z")

</div>

> <https://github.com/rust-lang/rfcs/blob/master/text/2141-alternative-registries.md>

---

<div class="post-metadata">

**Author:** ![Soni](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@Soni](https://internals.rust-lang.org/u/Soni)\
**Post date:** [October 16, 2018, 1:05am UTC](https://internals.rust-lang.org/t/federated-cargo/8573/3 "2018-10-16T01:05:34Z")

</div>

_More specifically_, we should allow projects like gtk-rs to run their own crate repository, and [crates.io](http://crates.io) should accept crates that depend on gtk-rs’s official repository.

If there’s ever a pure-Rust sqlite, it should also have an official repository.

Big projects like these can run their own repos. We should let them. We should encourage them to do so.

[crates.io](http://crates.io) should retrieve those crates for availability reasons. if the cargo can’t retrieve them directly, it should do so through [crates.io](http://crates.io) (or whatever the default registry is set to) instead.

(Yes, this is literally against what the RFC stands for. That’s intentional.)

---

<div class="post-metadata">

**Author:** ![jjpe](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/jjpe/32/9779_2.png) [@jjpe](https://internals.rust-lang.org/u/jjpe)\
**Post date:** [October 16, 2018, 5:07am UTC](https://internals.rust-lang.org/t/federated-cargo/8573/4 "2018-10-16T05:07:26Z")

</div>

> [@Soni](#):
>
> [Crates.io](http://Crates.io) should allow crates with [non-@crates.io](mailto:non-@crates.io) dependencies.

I strongly disagree with this. Having [crates.io](http://crates.io) depend on external crates is the path to breakage. Specifically, within [crates.io](http://crates.io) its curators can ensure that dependencies stay put after uploading (modulo yanking already broken crates). With external dependencies this guarantee disappears like snow on a hot summer's day.

---

<div class="post-metadata">

**Author:** ![ishitatsuyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ishitatsuyuki/32/2163_2.png) [@ishitatsuyuki](https://internals.rust-lang.org/u/ishitatsuyuki)\
**Post date:** [October 16, 2018, 1:07pm UTC](https://internals.rust-lang.org/t/federated-cargo/8573/6 "2018-10-16T13:07:23Z")

</div>

You’re mixing up high availability with self hosting. They are two different concepts.

First, high availability is most efficient if there are mutual trust in the cluster. Federating is more costly, because you can’t rely on a particular host to behave correctly.

Second, self hosting is often expensive. In the case of Mastodon, it requires considerable amount of memory. And many people can’t afford to install the ElasticSearch component as well.

Plus, federating doesn’t mean it’s regulation free. While it’s namespaced, you can still mass spam events (like crate update) to the fediverse.

In the case of Mastodon, decentralisation makes sense because Twitter was actually doing evil practice including tracking ads, feature/API removal and account termination. However, in the case of a package registry there’s nothing we could gain, apart from HA. Federation is expensive and complicated to code as well, and I don’t think that’s something that is demanded currently.

---

<div class="post-metadata">

**Author:** ![Soni](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@Soni](https://internals.rust-lang.org/u/Soni)\
**Post date:** [October 16, 2018, 1:10pm UTC](https://internals.rust-lang.org/t/federated-cargo/8573/7 "2018-10-16T13:10:35Z")

</div>

Uh… [pleroma](https://pleroma.social/)? It runs on a Pi…

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 25, 2019, 8:30am UTC](https://internals.rust-lang.org/t/federated-cargo/8573/8 "2019-03-25T08:30:59Z")

</div>

Closed on March 25, 2019, 8:30am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
