If you construct a Rust undertaking that will depend on exterior crates, Cargo appears for these crates on Crates.io by default; you don’t have to get hold of them manually. It’s also possible to confer with crates in your undertaking by URL fairly than by crate title, in case you want a crate that isn’t hosted within the registry, akin to one thing from a non-public repository.
Notice that some crates will solely set up and construct on Rust’s nightly channel, as a result of they use experimental options not out there in different channels. For those who’re on the discharge channel and also you attempt putting in such a crate, you gained’t get any warning till the compilation fails. Crate documentation normally mentions whether or not it requires the nightly channel or not, so learn up earlier than you embody, not to mention compile.
Crates can include binaries included. Some are command-line instruments utilized in Rust improvement; others are general-purpose instruments (akin to ripgrep). To put in one in all these crates, simply sort cargo set up
. This isn’t the solely option to distribute a binary created with Rust, nevertheless it’s a handy means for Rust builders to acquire them as a part of a workflow involving Rust instruments.