23.12 Installing Binary Crates with cargo install
Besides building your own projects, you can install Rust applications published on Crates.io directly using cargo install:
cargo install ripgrep # Installs the 'ripgrep' fast search tool
cargo install fd-find # Installs the 'fd' find alternative
Cargo downloads the source code, compiles it in release mode, and places the resulting binary in ~/.cargo/bin/. Ensure this directory is included in your system’s PATH environment variable to run the installed commands directly (e.g., rg, fd).
Use cargo install --list to see installed crates. To update an installed crate, run cargo install again with the same crate name. To uninstall, use cargo uninstall <crate_name>.