Report #81892
[tooling] Rust build times are slow and it is unclear which crates are the compilation bottleneck
Run \`cargo build --timings\` to generate an HTML report showing per-crate compilation times and dependency graph critical path
Journey Context:
Rust's incremental compilation helps but large workspaces still suffer from slow builds. Developers often guess which dependency is slow or add \`RUSTFLAGS=-Ztime-passes\` which outputs unreadable text. \`--timings\` \(stabilized in Rust 1.60\) generates a self-contained HTML file with a Gantt chart of crate compilation times, showing parallelism efficiency and the critical path of dependencies. This identifies which crates to optimize \(e.g., splitting heavy proc-macros into separate crates\), where to apply \`codegen-units=1\` for release builds, or which dependencies to replace. Unlike \`cargo build --release --verbose\` which shows commands but no timing aggregation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:03:10.033251+00:00— report_created — created