"Fossies" - the Fresh Open Source Software Archive

Member "cargo-0.61.1/src/doc/man/cargo-check.md" (13 Apr 2022, 1811 Bytes) of package /linux/misc/cargo-0.61.1.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "cargo-check.md": 0.60.0_vs_0.61.0.


{{*set actionverb="Check"}}


cargo-check - Check the current package


cargo check [options]


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. Some diagnostics and errors are only emitted during code generation, so they inherently won't be reported with cargo check.


{{> section-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.

{{> options-targets }}

{{> section-features }}

Compilation Options


{{> options-target-triple }}

{{> options-release }}

{{> options-profile-legacy-check }}

{{> options-ignore-rust-version }}

{{> options-timings }}


Output Options

{{#options}} {{> options-target-dir }} {{/options}}

Display Options

{{#options}} {{> options-display }}

{{> options-message-format }} {{/options}}

Manifest Options

{{#options}} {{> options-manifest-path }}

{{> options-locked }} {{/options}}

{{> section-options-common }}

Miscellaneous Options

{{#options}} {{> options-jobs }} {{> options-future-incompat }} {{/options}}

{{> section-environment }}

{{> section-exit-status }}


  1. Check the local package for errors:

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

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


{{man "cargo" 1}}, {{man "cargo-build" 1}}