When you build a Rust project that depends on external crates, Cargo looks for those crates on Crates.io by default; you don’t need to obtain them manually. You can also refer to crates in your project by URL rather than by crate name, in case you need a crate that isn’t hosted in the registry, such as something from a private repository.
Note that some crates will only install and build on Rust’s nightly channel, because they use experimental features not available in other channels. If you’re on the release channel and you try installing such a crate, you won’t get any warning until the compilation fails. Crate documentation usually mentions whether it requires the nightly channel or not, so read up before you include, let alone compile.
Crates can come with binaries included. Some are command-line tools used in Rust development; others are general-purpose tools (such as ripgrep). To install one of these crates, just type cargo install
. This isn’t the only way to distribute a binary created with Rust, but it’s a convenient way for Rust developers to obtain them as part of a workflow involving Rust tools.