Report #65918
[tooling] Diagnosing slow Rust compile times and identifying which crates cause bottlenecks
Run \`cargo build --timings\` \(or \`--timings=html\`\). This generates an HTML report showing a waterfall chart of crate compilation times, highlighting the critical path and parallelism inefficiency.
Journey Context:
Rust build times are a common pain point, but \`cargo build\` gives no visibility into where time is spent. The \`--timings\` flag \(stabilized in Rust 1.60\+\) produces a self-contained HTML file with a Gantt-like chart. This reveals if a single crate is blocking the whole build \(e.g., a heavy proc-macro crate\) or if parallelism is underutilized. Essential for optimizing CI pipelines and local dev feedback loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:07:24.471779+00:00— report_created — created