# ActivityPub for crates

**URL:** <https://internals.rust-lang.org/t/activitypub-for-crates/7938>\
**Category:** tools and infrastructure\
**Created:** [July 13, 2018, 5:10pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938 "2018-07-13T17:10:43Z")\
**Posts on this page:** 10\
**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:** [July 13, 2018, 5:10pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/1 "2018-07-13T17:10:43Z")

</div>

One should be able to interact with crates, using ActivityPub. This means downloading, liking, boosting crate versions and following the crates themselves for updates.

The bio should be the crate description, versions should be posts, and yanked versions should be deleted posts.

This would also allow rust forks to automatically pull in crates from [crates.io](http://crates.io) using federation.

---

<div class="post-metadata">

**Author:** ![mcy](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/mcy/32/6512_2.png) [@mcy](https://internals.rust-lang.org/u/mcy)\
**Post date:** [July 13, 2018, 7:12pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/2 "2018-07-13T19:12:06Z")

</div>

Does this solve any outstanding workflow problems in [crates.io](http://crates.io)? I’m hesitant for Rust to jump on the federation hype bubble, especially since I fail to see what problems it solves. The only problem I could _imagine_ it solves is not having [crates.io](http://crates.io) be the sole source of truth.

_I_ personally like the fact that [crates.io](http://crates.io) is maintained by an implicitly trusted party (the distributors of the compiler, which we all implicitly trust), and for situations in which this is unacceptable, you’d be hosting your own isolated crate registry _anyways_, which, for security purposes, should not be talking to [crates.io](http://crates.io) since that would defeat the point. Frankly, I’d rather download crates off of [crates.io](http://crates.io) than off of some rando’s instance, if given the choice.

Mind, for similar reasons I am skeptical of federated services in general, but for something like software distribution, I find it especially difficult to see value in decentralization (outside of mirroring, of course). And again, I think that hype bubbles are not good indicators that a technology should be adopted, much less shoe-horned into a use-case that does not obviously benefit from it.

---

<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:** [July 13, 2018, 9:02pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/3 "2018-07-13T21:02:44Z")

</div>

it’s so I can fork [crates.io](http://crates.io) and still be able to use things from it. [crates.io](http://crates.io) doesn’t need to accept ActivityPub from other places. think of it like RSS feeds, but interactive.

---

<div class="post-metadata">

**Author:** ![mcy](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/mcy/32/6512_2.png) [@mcy](https://internals.rust-lang.org/u/mcy)\
**Post date:** [July 13, 2018, 10:13pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/4 "2018-07-13T22:13:26Z")

</div>

I really don’t understand why you would want to do that. If you need your own crate registry, you’re at the point where relying on [crates.io](http://crates.io) is a bad idea.

Think of it this way: you’re running an in-house registry that your `Cargo.toml` or `BUILD` or whatever files are set to point to, because you don’t want to run a monoworkspace (pretty reasonable if you’re at scale). Then you certainly should not be talking to an outside registry directly, when your own registry should be replicating the bits of [crates.io](http://crates.io) that you care about.

If what you want is for your private registry to update automatically… I also think that’s a bad idea, because it’s about as bad as putting `some-crate = "*"` in your `Cargo.toml`, which is a _terrible_ idea.

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steveklabnik/32/4524_2.png) [@steveklabnik](https://internals.rust-lang.org/u/steveklabnik)\
**Post date:** [July 14, 2018, 1:40am UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/5 "2018-07-14T01:40:38Z")

</div>

There has been some discussion of a stream API, that would let you mirror the registry. Nobody has had the time to implement it yet, though.

---

<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:** [July 14, 2018, 12:04pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/6 "2018-07-14T12:04:58Z")

</div>

I want to follow crates I care about from my mastodon account, and I want to fork rust in a way that is backwards-compatible with all existing crates.

That is all. It’s that simple. I just want the ability to interact with crates on social networks and a backwards-compatible fork that can be installed _as rust_, system-wide, without affecting anyone’s workflow.

ActivityPub would be mainly for the former because I can technically have my cargo fork pull from [crates.io](http://crates.io) as a fallback to my own crate repository, and then that would just work.

---

<div class="post-metadata">

**Author:** ![repax](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/repax/32/1342_2.png) [@repax](https://internals.rust-lang.org/u/repax)\
**Post date:** [July 14, 2018, 8:20pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/7 "2018-07-14T20:20:51Z")

</div>

Another alternative could be some kind of Discourse integration for [crates.io](http://crates.io), and perhaps even for docs.rs?

An example of this is the discussion section for each entry in the php API reference manual. ([example](http://php.net/manual/en/function.link.php))

This could facilitate community participation, and sharing of tips and advice on how to use the crates.

---

<div class="post-metadata">

**Author:** ![kornel](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kornel/32/2711_2.png) [@kornel](https://internals.rust-lang.org/u/kornel)\
**Post date:** [July 14, 2018, 11:48pm UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/8 "2018-07-14T23:48:14Z")

</div>

That could be a nice addition to crates.rs. Would you like to give it a try?

> **[crates.rs / Crates.rs 🔰 main project](https://gitlab.com/crates.rs/crates.rs)**
>
> START HERE. This is the top-level project for crates.rs that connects all the repositories together.

Currently the pages are static, but it has a database of crates, so it should be easy to add a feed and an API. “Starring” of crates via ostatus protocol sounds cool.

---

<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:** [July 15, 2018, 12:42am UTC](https://internals.rust-lang.org/t/activitypub-for-crates/7938/9 "2018-07-15T00:42:51Z")

</div>

ActivityPub, not ostatus. ostatus is kinda weird, not very good. even GNU social supports ActivityPub nowadays.

---

<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/activitypub-for-crates/7938/10 "2019-03-25T08:30:30Z")

</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.
