Inspect slow compilation phases.
Section: Compiler diagnostics
Generate build timings
bash
bash
cargo build --timingsExplanation
Useful for troubleshooting unexpectedly slow builds in larger CLI projects.
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 Compiler diagnostics
Emit machine-readable diagnostics
Print messages in JSON form for editor tooling or scripts.
Apply compiler suggestions automatically
Use rustc suggestions to fix straightforward issues.
Apply suggestions even with a broken crate
Try fixing code even if the crate currently does not compile cleanly.