CARGO-HELP(1)
β¨ CARGO-HELP β¨
okay so bestie, welcome to the General Commands Manual page for cargo-help π this is the lil' corner of the Cargo universe that's literally just here to hand you help. no builds, no drama, just answers π«Ά
πΈ NAME πΈ
cargo-help β get help for a Cargo command π
π SYNOPSIS π
cargo help [subcommand]
π¦ DESCRIPTION π¦
It prints a help message for whatever command you name. that's it. that's the whole job. iconic behaviour honestly β¨
For commands that have subcommands, you separate the command levels with spaces. So like, cargo help report future-incompatibilities shows you the help for the cargo report future-incompatibilities command. no cap π
β οΈ spaces only separate hierarchy levels between a parent command and its subcommands. if a dash is genuinely part of a command's name β think generate-lockfile β you gotta keep that dash. always. fr fr.
You can also write multiple command levels as a single dash-joined word</> π§ so cargo help report-future-incompatibilities is literally equivalent to cargo help report future-incompatibilities. same energy, different fit π
π OPTIONS π
π Display Options π
-v,--verboseβ use verbose output. You can specify it twice for "very verbose" output, which adds extra stuff like dependency warnings and build script output. You can also set this with theterm.verboseconfig value <https://doc.rust-lang.org/cargo/reference/config.html>. obsessed with the double-v, honestly π-q,--quietβ do not print cargo log messages. Can also be set with theterm.quietconfig value <https://doc.rust-lang.org/cargo/reference/config.html>. the introvert flag π«Ά--colorwhen β controls when colored output gets used. the valid values are:auto(default) β automatically detects whether your terminal can do color support.alwaysβ always display colors. go off πneverβ never display colors. minimalist moment.
Can also be set with the term.color config value <https://doc.rust-lang.org/cargo/reference/config.html>.
π Manifest Options π
--lockedβ asserts that the exact same dependencies and versions are used as when the existingCargo.lockfile was originally generated. Cargo will exit with an error when either of these scenarios shows up:- The lock file is missing. π
- Cargo attempted to change the lock file due to a different dependency resolution.
It may be used in environments where deterministic builds are the vibe, such as in CI pipelines. reproducibility queen π
--offlineβ prevents Cargo from accessing the network for any reason. Without this flag, Cargo will stop with an error if it needs the network and the network isn't available. With this flag, Cargo will attempt to proceed without the network if possible.
beware bestie, this may result in different dependency resolution than online mode π Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. See the cargo-fetch(1) command to download dependencies before going offline.
Can also be set with the net.offline config value <https://doc.rust-lang.org/cargo/reference/config.html>.
--frozenβ equivalent to specifying both--lockedand--offline. two-for-one deal, slay π
π Common Options π
+toolchainβ if Cargo has been installed with rustup, and the first argument tocargobegins with+, it gets interpreted as a rustup toolchain name (like+stableor+nightly). See the rustup documentation <https://rust-lang.github.io/rustup/overrides.html> for more info about how toolchain overrides work. β¨--configKEY=VALUE or PATH β overrides a Cargo configuration value. The argument should be in TOML syntax ofKEY=VALUE, or provided as a path to an extra configuration file. This flag may be specified multiple times. See the command-line overrides section <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> for more info. stack 'em up π§-CPATH β 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, likecargo -C path/to/my-project build.
This option is only available on the nightly channel <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and requires the -Z unstable-options flag to enable (see #10098 <https://github.com/rust-lang/cargo/issues/10098>). nightly girlies only π
-h,--helpβ prints help information. very meta of us π-Zflag β unstable (nightly-only) flags to Cargo. Runcargo -Z helpfor details. mysterious. secret menu energy π«£
π± ENVIRONMENT π±
See the reference <https://doc.rust-lang.org/cargo/reference/environment-variables.html> for the deets on environment variables that Cargo reads. iykyk π
β EXIT STATUS β
0β Cargo succeeded. we love a win π101β Cargo failed to complete. it's giving tragedy π
π EXAMPLES π
- Get help for a command:
cargo help build
- Get help for a nested command:
cargo help report future-incompatibilities
- The dash-joined form also works:
cargo help report-future-incompatibilities
- Help is also available with the
--helpflag:
cargo build --help
π SEE ALSO π
and that's the whole page bestie!! π this was the CARGO-HELP(1) page from the General Commands Manual, and yeah β the little footer tag at the bottom says CARGO-HELP(1) too, so now you know where you are π go read some help, you deserve it β¨π¦
π¦ where this page comes from
- ubuntu stonking: cargo-1.97 1.97.1+dfsg-0ubuntu1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms