cargo-check - Check the current package
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.
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.
-
Check the local package for errors:
cargo check
-
Check all targets, including unit tests:
cargo check --all-targets --profile=test