Installing
Recipe | Crates | Categories |
---|---|---|
Build and install a Rust binary with cargo install | ||
Install a Rust binary with cargo binstall |
Build and install a Rust binary with cargo install
This command manages cargo
’s local set of installed binary crates. Only packages which have executable [[bin]]
or [[example]]
targets can be installed, and all executables are installed into the installation root’s bin folder. By default only binaries, not examples, are installed. There are multiple sources from which a crate can be installed. The default source location is crates.io
, but the --git, --path, and --registry flags can change this source. This command operates on system or user level, not project level.
Install a Rust binary with cargo binstall
cargo binstall
provides a low-complexity mechanism for installing Rust binaries as an alternative to building from source (e.g. via cargo install
) or manually downloading packages. This is intended to work with existing CI artifacts and infrastructure, and with minimal overhead for package maintainers.
cargo binstall
works by fetching the crate information from crates.io
and searching the linked repository for matching releases and artifacts, falling back to the quickinstall
third-party artifact host, to alternate targets as supported, and finally to cargo install
as a last resort.