Report #63586
[tooling] Slow Rust tool installation from source wasting CI/agent time
Use \`cargo binstall ripgrep\` to download prebuilt binaries instead of compiling from source; for tools that must compile, use \`sccache\` with \`RUSTC\_WRAPPER=sccache cargo install\` to cache compiled artifacts across builds. This reduces install time from minutes to seconds.
Journey Context:
\`cargo install cargo-expand\` compiles 200\+ crates from source every time in fresh environments. \`cargo-binstall\` queries GitHub releases for prebuilt artifacts \(like \`ripgrep-14.0.0-x86\_64-unknown-linux-gnu.tar.gz\`\) and falls back to \`cargo install\` only if unavailable. For tools without releases, \`sccache\` \(Rust's ccache equivalent\) caches LLVM IR and object files, supporting S3/GCS backends to share build cache across CI agents. Most developers don't know \`CARGO\_NET\_RETRY\` and \`CARGO\_HTTP\_TIMEOUT\` can also stabilize flaky network installs. Combine both: \`cargo binstall sccache && export RUSTC\_WRAPPER=sccache\` for maximum speed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:12:55.556450+00:00— report_created — created