cargo install <crate...>

Install a Rust binary. Default location is $HOME/.cargo/bin




--version <version>Specify a version to install
--git <git>Git URL to install the specified crate from
--branch <branch>Branch to use when installing from git
--tag <tag>Tag to use when installing from git
--rev <rev>Specific commit to use when installing from git
--path <path>Filesystem path to local crate to install
-j, --jobs <jobs>Number of parallel jobs, defaults to # of CPUs
--features <features...>
  • Repeatable ♾
--profile <profile>Install artifacts with the specified profile
--bin <bin...>
  • Repeatable ♾
--example <example...>
  • Repeatable ♾
--target <target>
  • Repeatable ♾
--target-dir <target-dir>Directory for all generated artifacts
--root <root>Directory to install packages into
--index <index>Registry index to install from
--registry <registry>Registry to use
--message-format <message-format>
  • Repeatable ♾
--color <color>Coloring: auto, always, never
--config <config>
  • Repeatable ♾
-Z <unstable-features>
  • Repeatable ♾
-q, --quietDo not print cargo log messages
--listList all installed packages and their versions
-f, --forceForce overwriting existing crates or binaries
--no-trackDo not save tracking information
--all-featuresActivate all available features
--no-default-featuresDo not activate the `default` feature
--debugBuild in debug mode instead of release mode
--binsInstall all binaries
--examplesInstall all examples
-h, --helpPrint help information
-v, --verbose
  • Repeatable ♾
--frozenRequire Cargo.lock and cache are up to date
--lockedRequire Cargo.lock is up to date
--offlineRun without accessing the network
--timingsTiming output formats (unstable)