Overview
Add a --trace flag that emits structured timing spans showing exactly where time is going during a build, with actionable suggestions.
Example output
rx build --trace
┌─ rx startup 12ms
│ ├─ parse rx.toml 3ms
│ ├─ detect linker 4ms
│ └─ load workspace 5ms
├─ cache lookup 8ms (miss)
├─ cargo build 18.3s
│ ├─ compile mylib 6.1s ← bottleneck
│ ├─ compile myapp 4.2s
│ └─ linking 8.0s ← second bottleneck
└─ cache store 120ms
Suggestions:
→ mylib takes 6.1s — consider splitting into smaller crates
→ linking takes 8.0s — mold would reduce this to ~1.5s
Implementation
- Use cargo's --timings JSON output to extract per-crate durations
- Instrument rx's own overhead (config load, cache lookup, etc.)
- Identify bottleneck crates and linking time
- Suggest actionable fixes (mold, crate splitting, etc.)
Priority
v0.3 — diagnostic gold for large projects
Overview
Add a --trace flag that emits structured timing spans showing exactly where time is going during a build, with actionable suggestions.
Example output
Implementation
Priority
v0.3 — diagnostic gold for large projects