Skip to content

rx build --trace: structured build tracing with suggestions #19

Description

@iPeluwa

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.3Target for v0.3 release

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions