LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cargo-verify-project

Check correctness of a Cargo.toml manifest

TLDR

Verify current project manifest
$ cargo verify-project
copy
Verify specific manifest
$ cargo verify-project --manifest-path [path/to/Cargo.toml]
copy
Verify with locked dependencies
$ cargo verify-project --locked
copy
Verify offline (no network access)
$ cargo verify-project --frozen
copy

SYNOPSIS

cargo verify-project [options]

DESCRIPTION

cargo verify-project parses and validates the local Cargo.toml manifest file. It outputs a JSON object indicating whether the manifest is syntactically correct and contains all required fields, along with error details on failure.
This command is useful in CI/CD pipelines and pre-commit hooks for catching manifest errors early. It checks syntax correctness, valid dependency specifications, proper metadata formatting, and required fields. It does not verify that dependencies actually exist on a registry, only that the manifest itself is well-formed. The exit status is 0 for valid manifests and 1 for invalid ones.

PARAMETERS

--manifest-path path

Path to Cargo.toml file.
--locked
Assert that Cargo.lock is up-to-date.
--frozen
Assert that Cargo.lock is up-to-date and prevent network access.
--offline
Run without accessing the network.
-v, --verbose
Use verbose output.
-q, --quiet
Suppress cargo output messages.
--config KEY=VALUE
Override a Cargo configuration value.
-C path
Change to directory before executing.

OUTPUT

Success

$ {"success":"true"}
copy
Failure
$ {"invalid":"error message"}
copy

EXIT STATUS

0

Manifest is valid.
1
Manifest is invalid.

CAVEATS

Does not verify that dependencies actually exist on a registry, only that the manifest syntax is well-formed. Useful for CI/CD pipelines and pre-commit hooks.

SEE ALSO

Copied to clipboard
Kai