Report #54744
[tooling] Diagnosing slow Rust build times in CI or locally without guessing which crate is the bottleneck
Run \`cargo build --timings\` \(or \`--timings=html\`\) and open \`target/cargo-timings/cargo-timing.html\` to see a waterfall chart of crate compilation times. Use this to identify sequential bottlenecks and consider splitting heavy crates or enabling more codegen units.
Journey Context:
Most developers blindly add \`-j\` or switch linkers without data. \`--timings\` emits JSON or HTML showing exactly where the critical path is. The HTML view color-codes by crate and shows how many units are active over time. This is more actionable than \`cargo build --verbose\` spam. It reveals if you're bound by a single large crate \(needs splitting\) or by linking \(needs mold/lld\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:23:01.639968+00:00— report_created — created