Rust CLI Build, Run, Test, and Lint/Check all package targets

Type-check binaries, tests, examples, and benches.

Section: Profiles and target selection

Check all package targets

bash
bash
cargo check --all-targets
Explanation

Broad validation helps catch code paths not built by default.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Profiles and target selection
Build one binary target
Compile a chosen binary only.
OpenIn sheetbashsame section
Build an example target
Compile only a chosen example.
OpenIn sheetbashsame section
Build tests without running them
Compile test artifacts only.
OpenIn sheetbashsame section
Type-check without producing binaries
Validate code quickly without final artifacts.
OpenIn sheetbash2 tag match
Run the test suite
Build and run tests for the local package.
OpenIn sheetbash1 tag match
Format source code
Run rustfmt across the package.
OpenIn sheetbash1 tag match