CARGO-VERIFY-PROJECT(1)

πŸ“¦ version 1.81.0, in ubuntu jammy, ubuntu noble

✨ NAME ✨

cargo-verify-project</b> β€” it's the vibe check for your crate manifest, bestie πŸ’…

(and yes, this is from the General Commands Manual β€” the cargo-verify-project(1) page, if we're being formal πŸŽ€)


πŸ¦‹ SYNOPSIS πŸ¦‹

cargo verify-project [options]

🌸 DESCRIPTION 🌸

okay so listen. this command reads your local manifest and checks whether it's actually valid, and then it tells you the tea in the form of a JSON object ✨

if your validation slays, you get this:

{"success":"true"}

and if your workspace is invalid, you get this instead:

{"invalid":"human-readable error message"}

no cap, that's the whole vibe β€” one little JSON blob, zero drama πŸ™ˆ


πŸ’– OPTIONS πŸ’–

🌈 Display Options 🌈

  • -v, --verbose β€” use verbose output. and get this, you can specify it twice for "very verbose" output, which also throws in extra stuff like dependency warnings and build script output. you can also set this with the term.verbose config value at <https://doc.rust-lang.org/cargo/reference/config.html> πŸ‘‘
  • -q, --quiet β€” do NOT print cargo log messages. like, silence, please 🫢 may also be specified with the term.quiet config value at <https://doc.rust-lang.org/cargo/reference/config.html>.
  • --color when β€” controls when colored output gets used. valid values are:
    • auto (the default): automatically detect if color support is available on the terminal.
    • always: always display colors. always. every time. 🌈
    • never: never display colors. boring but valid πŸ’€

may also be specified with the term.color config value at <https://doc.rust-lang.org/cargo/reference/config.html>.

πŸŽ€ Manifest Options πŸŽ€

  • --manifest-path path β€” path to the Cargo.toml file. by default, Cargo goes looking for the Cargo.toml file in the current directory or any parent directory, like it's hunting for its keys πŸ”
  • --locked β€” asserts that the exact same dependencies and versions are used as when the existing Cargo.lock file 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's giving "deterministic builds only", so it's great for environments where you want that, like CI pipelines ✨

  • --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.

may also be specified with the net.offline config value at <https://doc.rust-lang.org/cargo/reference/config.html>.

  • --frozen β€” equivalent to specifying both --locked and --offline at the same time. two-for-one, iconic πŸ’…

πŸ’œ 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 +stable or +nightly). see the rustup documentation at <https://rust-lang.github.io/rustup/overrides.html> for more information about how toolchain overrides work.
  • --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 at <https://doc.rust-lang.org/cargo/reference/config.html#command-line-overrides> for 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 example cargo -C path/to/my-project build.
heads up: this option is only available on the nightly channel at <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html> and requires the -Z unstable-options flag to enable (see #10098 at <https://github.com/rust-lang/cargo/issues/10098>). so, nightly girlies only 🧚
  • -h, --help β€” prints help information. the classic 🫢
  • -Z flag β€” unstable (nightly-only) flags to Cargo. run cargo -Z help for details.

🌟 ENVIRONMENT 🌟

see the reference at <https://doc.rust-lang.org/cargo/reference/environment-variables.html> for details on environment variables that Cargo reads πŸ“


⭐ EXIT STATUS ⭐

  • 0: the workspace is OK. slay πŸŽ‰
  • 1: the workspace is invalid. not slay 😭

πŸ”₯ EXAMPLES πŸ”₯

  1. check the current workspace for errors:
cargo verify-project

πŸ‘‘ SEE ALSO πŸ‘‘

cargo(1), cargo-package(1)


and that's the whole page, bestie β€” it signs off as CARGO-VERIFY-PROJECT(1), which is also how it walked in the door at the top. go forth and verify, you main character πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from