Skip to content

Latest commit

 

History

History
87 lines (49 loc) · 1.62 KB

cargo-check.adoc

File metadata and controls

87 lines (49 loc) · 1.62 KB

cargo-check(1) Manual Page

NAME

cargo-check - Check the current package

SYNOPSIS

cargo check [OPTIONS]

DESCRIPTION

Check a local package and all of its dependencies for errors. This will essentially compile the packages without performing the final step of code generation, which is faster than running cargo build. The compiler will save metadata files to disk so that future runs will reuse them if the source has not been modified.

OPTIONS

Package Selection

Target Selection

When no target selection options are given, cargo check will check all binary and library targets of the selected packages. Binaries are skipped if they have required-features that are missing.

Output Options

Common Options

EXAMPLES

  1. Check the local package for errors:

    cargo check
  2. Check all targets, including unit tests:

    cargo check --all-targets --profile=test

SEE ALSO

man:cargo[1], man:cargo-build[1]