Section: Environment variables

Pass custom compiler flags

bash
bash
RUSTFLAGS="-D warnings" cargo check
Explanation

Handy for stricter CI or low-level compiler experiments.

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 Environment variables
Show a backtrace on panic
Display stack traces from Rust panics.
OpenIn sheetbashsame section
Enable Cargo debug logging
Emit tracing logs from Cargo itself.
OpenIn sheetbashsame section
Change Cargo home
Use a non-default cache and install location.
OpenIn sheetbashsame section
Create project-local Cargo config
Store configuration in the project under `.cargo/config.toml`.
Build documentation
Generate docs for the package and dependencies.
Show the dependency tree
Inspect the dependency graph for the package.