CARGO-INFO(1)
π NAME π
okay so bestie, this is cargo-info β it displays information about a package. that's the whole vibe. π«Ά
β¨ SYNOPSIS β¨
cargo info [options] spec
πΈ DESCRIPTION πΈ
so basically this command shows you the tea on a package. it goes and fetches the data from that package's Cargo.toml file and then presents it to you in a human-readable format. it's giving "tell me everything" energy and honestly? iconic. π
π OPTIONS π
π Info Options
specβ fetch the info about the package you specified. the spec can be a package ID, so peepcargo-pkgid(1)for the SPEC format (iykyk). if the package you named is part of the current workspace, you'll get the info straight from the localCargo.tomlfile instead. also, if theCargo.lockfile doesn't exist yet, it will be created. and if you didn't specify a version, the appropriate version gets picked based on the Minimum Supported Rust Version (MSRV). no cap. β¨--index indexβ the URL of the registry index to use.--registry registryβ the name of the registry to use. registry names are defined in Cargo config files:https://doc.rust-lang.org/cargo/reference/config.html. if you don't specify one, the default registry is used, which is defined by theregistry.defaultconfig key, and that defaults tocrates-io. slay.
π¦ Display Options
-v,--verboseβ use verbose output. you can specify it twice for "very verbose" output, which includes extra stuff like dependency warnings and build script output. may also be specified with theterm.verboseconfig value:https://doc.rust-lang.org/cargo/reference/config.html.-q,--quietβ do not print cargo log messages. may also be specified with theterm.quietconfig value:https://doc.rust-lang.org/cargo/reference/config.html.--color whenβ controls when colored output is used. valid values are:auto(default): automatically detect if color support is available on the terminal.always: always display colors.never: never display colors.
may also be specified 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 arises:- 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 desired, such as in CI pipelines. very demure, very deterministic. π
--offlineβ prevents Cargo from accessing the network for any reason. without this flag, Cargo will stop with an error if it needs to access 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.
may also be specified 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, we love a combo deal. π
π Common Options
+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+stableor+nightly). see the rustup documentation:https://rust-lang.github.io/rustup/overrides.htmlfor more information about how toolchain overrides work.--config KEY=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-overridesfor more information.-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 examplecargo -C path/to/my-project build.
heads up: this option is only available on the nightly channelhttps://doc.rust-lang.org/book/appendix-07-nightly-rust.htmland requires the-Z unstable-optionsflag to enable (see #10098https://github.com/rust-lang/cargo/issues/10098). nightly girlies only. π
-h,--helpβ prints help information. our savior fr fr.-Z flagβ unstable (nightly-only) flags to Cargo. runcargo -Z helpfor details.
π± ENVIRONMENT π±
see the reference: https://doc.rust-lang.org/cargo/reference/environment-variables.html for details on environment variables that Cargo reads. β¨
β EXIT STATUS β
0: Cargo succeeded. we ate. π101: Cargo failed to complete. it's giving tragedy. π
π§ EXAMPLES π§
- inspect the
serdepackage from crates.io:
cargo info serde
- inspect the
serdepackage with version1.0.0:
cargo info serde@1.0.0
- inspect the
serdepackage from the local registry:
cargo info serde --registry my-registry
π SEE ALSO π
and that's the whole page bestie!! this lil manual page is from CARGO-INFO(1) β General Commands Manual, dated CARGO-INFO(1) at the bottom, which honestly is just the title doing a little encore at the end. periodt. π
β¨
π¦ where this page comes from
- alpine 3.24: cargo-doc 1.96.1-r0 Β· Apache-2.0 OR MIT
- alpine 3.24: chromium-cargo-doc 1.97.0-r0 Β· Apache-2.0 OR MIT
- centos-stream 10: cargo 1.99.1-1.el10 Β· (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- centos-stream 9: cargo 1.99.1-1.el9 Β· (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- debian bookworm: cargo-web 1.96.0+dfsg1-1~deb12u2 Β· MIT OR Apache-2.0
- debian trixie: cargo-web 1.96.0+dfsg1-1~deb13u1+b1 Β· MIT OR Apache-2.0
- fedora 43: cargo 1.98.1-1.fc43
- fedora 43: cargo 1.99.0-1.fc43
- fedora 43: cargo 1.99.1-2.fc43 Β· (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- fedora 44: cargo 1.98.1-1.fc44
- fedora 44: cargo 1.99.0-1.fc44
- fedora 44: cargo 1.99.1-2.fc44 Β· (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-3.0)
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.96 1.96.1-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.97 1.97.0-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 Β· Apache-2.0 OR MIT
- opensuse-leap 16.0: cargo1.98 1.98.0-160000.1.1 Β· Apache-2.0 OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms