Report #9478
[tooling] How to diagnose which dependencies are slowing down Rust compile times
Use \`cargo build --timings\` to generate an HTML report \(\`target/cargo-timings/cargo-timing.html\`\) showing per-crate compilation duration and parallelism, identifying bottleneck dependencies.
Journey Context:
Rust compile times scale poorly with crate count. Blindly optimizing without data fails because the critical path is often a single slow crate \(like \`syn\`, \`serde\_derive\`, or heavy crypto libraries\). The \`--timings\` flag \(stabilized in Rust 1.60\) outputs a self-contained HTML file with a waterfall chart showing when each crate started/finished and how many CPUs were utilized. This reveals whether you should upgrade a dependency \(faster proc-macro\), split a large crate, or enable feature flags to reduce compile units. It replaces guesswork with data-driven optimization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:16:27.847164+00:00— report_created — created