Repository navigation
Description
Symptom
Local Rust builds during dev (e.g. bash test, bash lint, agent-driven cargo build -p fastled-cli) are slow — first-time build of fastled-py regularly takes 8–10 min because dependencies (PyO3, reqwest, tokio, axum, clap, zip, tar, zstd, flate2) are recompiled from scratch on every clean build. CI builds use zccache via zackees/setup-soldr@v0 and complete much faster on cache hit.
Root cause
Two related gaps in local dev tooling:
-
_cargotrampoline (./_cargo) ends withexec cargo "$@"— it sets PATH andCARGO_BUILD_TARGETbut does NOT route throughsoldr cargo. So even whensoldrandzccacheare installed locally (/c/tools/python13/Scripts/soldr&.../zccache), they're never invoked. -
ci/env.py::_apply_sccache(line 168) setsRUSTC_WRAPPER=sccachewhensccacheis on PATH. But the project uses zccache (via soldr), not sccache. The name & lookup are out of date — this function never finds zccache, so even tools that respectRUSTC_WRAPPER(e.g. ad-hoccargoinvocations) miss the cache.
CI workflows (.github/workflows/_unit-test.yml, _lint.yml, _build.yml, _integration-test.yml) sidestep this by setting RUSTC_WRAPPER: sccache AND installing both mozilla-actions/sccache-action AND zackees/setup-soldr@v0 — but the setup mixes sccache and soldr/zccache, and local dev gets neither by default.
Impact
- Agent-driven Rust subagents on this repo run out their token budgets on
cargo build(e.g. PR Port the remaining Python app orchestration layer to Rust #72 Stream B agent: 600 s wall clock, mostly first-build offastled-py). - Developers see 10-min cold builds locally that should be sub-minute on warm cache.
- The user reported this directly: "why was it taking so slow? We should be using soldr for these builds."
Proposed fixes
-
Wrap
_cargowith soldr when available. Change the tail of./_cargoto prefersoldr cargo "\$@"whencommand -v soldrsucceeds, falling back to plaincargo. This makes every localbash lint/bash test/bash buildinvocation transparently use zccache. -
Rename/repurpose
ci/env.py::_apply_sccacheto_apply_zccache(or both) — setRUSTC_WRAPPERto whichever ofzccache/sccacheis found on PATH, with zccache taking precedence to match project convention. -
Decide CI strategy: the workflows currently install BOTH sccache-action and setup-soldr but only set
RUSTC_WRAPPER=sccache. Either drop sccache-action (if soldr provides equivalent caching via zccache) or document why both are needed.
Verification
- After fix 1:
bash teston a clean workspace should populate~/.zccache/artifacts/and a follow-up clean build should be measurably faster. - After fix 2:
python -c \"from ci.env import build_env; import os; e = build_env(); print(e.get('RUSTC_WRAPPER'))\"should print the zccache path.
Notes
This was found while implementing #72 (porting remaining Python orchestration to Rust). The work itself didn't require touching soldr/zccache, but the slow local dev loop made agent-driven implementation expensive.
Activity
Port remaining Python app orchestration to Rust (closes #72) (#77)
build: retire ./_cargo trampolines; route Rust tooling through soldr (c…
build: align rustc wrapper on zccache; drop redundant sccache from CI (…
build: drop sccache fallback; zccache is the only compile cache (#80)
ci(lint): install rustfmt/clippy via rustup; relax test_version assert (