cargo-check man page

cargo-check — Check the current project

Synopsis

cargo check [Options]

Description

Check a local package and all of its dependencies.

If the --package argument is given, then SPEC is a package id specification which indicates which package should be checked. If it is not given, then the current package is checked. For more information on SPEC and its format, see the "cargo help pkgid" command.

Compilation can be configured via the use of profiles which are configured in the manifest. The default profile for this command is dev, but passing the --release flag will use the release profile instead.

Options

-h, --help

Print this message.

-p SPEC, --package SPEC ...

Package to check.

-j IN, --jobs IN

Number of parallel jobs, defaults to # of CPUs.

--lib

Check only this package's library.

--bin NAME

Check only the specified binary.

--example NAME

Check only the specified example.

--test NAME

Check only the specified test target.

--bench NAME

Check only the specified benchmark target.

--release

Check artifacts in release mode.

--all-features

Check with all available features.

--features FEATURES

Space-separated list of features to also check.

--no-default-features

Do not check the default feature.

--target TRIPLE

Check for the target triple.

--manifest-path PATH

Path to the manifest to compile.

-v, --verbose

Use verbose output.

-q, --quiet

No output printed to stdout.

--color WHEN

Coloring: auto, always, never.

Examples

Check a local package and all of its dependencies

$ cargo check

Check a package with optimizations

$ cargo check --release

See Also

cargo(1)

Info

May 2016 The Rust package manager Cargo Manual