Crates.io integration


#1

Hello,

I came into Rust from a Ruby world.
In a Ruby world there is Rubygems. It has webhooks mechanism which allow you to be notified on library updates.
I used this webhook to build a simple system that notified me in Slack whenever a newer version of library I used was published.

It is very home-level project and it works like the following:

  • There is simple API to upload Gemfile.lock file (analog of Cargo.lock)
  • Dependencies and their versions are being fetched from the file and stored into database
  • Once the app receives a request via webhook it compares version and notifies me if a newer version is published.

So, the whole thing is my home-level Gemnasium (which was acquired by GitLab) :slight_smile:

I would like to build something similar for my Rust apps.
I believe it would allow me to stay up to date.
And maybe I could make this general enough to be useful for others

As far as I can see crates.io doesn’t have webhooks.
Is there any API I could use to check for updates by myself?
Or maybe there are similar projects already?
Please, tell what do you think about that?

Thank you.


#2

All crate updates are pushed to the index on GitHub: https://github.com/rust-lang/crates.io-index so I presume you could use the GitHub API to watch for changes and fire updates based on that.

Just for knowing what’s up to date there’s http://deps.rs/


#3

Thanks @kornel, sounds interesting!


#4

We have wanted to add better APIs to crates.io, if that might be something you’d be interested in working on, we should talk!


#5

I definitely don’t mind to discuss :slight_smile:
Though I am not sure I am smart and experienced enough to work on such things :man_shrugging: