crates.io (https://crates.io) is Rust's public repository for community crates. This links dependencies together, enables discovery, and lets users search for packages. For crate maintainers, it offers usage statistics and a place to host a readme file. cargo makes it possible to publish crates quickly and easily, as well as to handle updates. Let's see how.
Uploading to crates.io
Getting ready
For this recipe, we are going to publish a crate with minimal functionality. If you already have source code to work on (that is, your own project), feel free to use it. If not, create a new library project using cargo new public-crate --lib and open it in VS Code:
Go to https://crates.io and log in to your account (using...