{{#option “+
toolchain”}} If Cargo has been installed with rustup, and the first argument to cargo
begins with +
, it will be interpreted as a rustup toolchain name (such as +stable
or +nightly
). See the rustup documentation for more information about how toolchain overrides work. {{/option}}
{{#option “--config
KEY=VALUE or PATH”}} Overrides a Cargo configuration value. The argument should be in TOML syntax of KEY=VALUE
, or provided as a path to an extra configuration file. This flag may be specified multiple times. See the command-line overrides section for more information. {{/option}}
{{#option “-C
PATH”}} Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest (Cargo.toml
), as well as the directories searched for discovering .cargo/config.toml
, for example. This option must appear before the command name, for example cargo -C path/to/my-project build
.
This option is only available on the nightly channel and requires the -Z unstable-options
flag to enable (see #10098). {{/option}}
{{#option “-h
” “--help
”}} Prints help information. {{/option}}
{{#option “-Z
flag”}} Unstable (nightly-only) flags to Cargo. Run cargo -Z help
for details. {{/option}}
{{/options}}