Skip to content

Retire ./_cargo, ./_rustc, ./_rustfmt trampolines — replace with soldr #76

Closed

Description

@zackees

Goal

Delete the local trampoline scripts ./_cargo, ./_rustc, ./_rustfmt and replace every caller with the appropriate soldr <subcommand> invocation. The trampolines were useful before soldr existed; now they're noise that bypasses the build cache.

Current state

  • ./_cargo — fiddles with PATH + CARGO_BUILD_TARGET, then exec cargo "\$@". Does NOT route through soldr/zccache → cold builds take 8–10 min (see Local dev cargo builds bypass soldr/zccache — slow rebuilds #75).
  • ./_rustc, ./_rustfmt — same pattern, exec rustc/exec rustfmt.
  • Callers:
    • ./lint invokes \"\$SCRIPT_DIR/_cargo\" fmt --all --check and \"\$SCRIPT_DIR/_cargo\" clippy --workspace --all-targets -- -D warnings
    • ./test invokes \"\$SCRIPT_DIR/_cargo\" test --workspace
    • Possibly other places: needs an audit (grep -rn '_cargo\|_rustc\|_rustfmt' .)

Plan

  1. Replace each \"\$SCRIPT_DIR/_cargo\" … with soldr cargo … in ./lint, ./test, and any other script that calls it. Add an early command -v soldr >/dev/null || { echo 'install soldr: uv pip install soldr'; exit 1; } guard.
  2. Do the same for _rustc → soldr rustc, _rustfmt → soldr rustfmt.
  3. Delete ./_cargo, ./_rustc, ./_rustfmt.
  4. Update CLAUDE.md (and any other dev docs) to mention soldr instead of the trampolines.
  5. Audit GitHub Actions workflows — they call the scripts (./install, ./test, ./lint) which inherit the soldr invocation, so should remain unchanged. Verify.

Notes on Windows MSVC handling

./_cargo currently exports CARGO_BUILD_TARGET=x86_64-pc-windows-msvc on MSYS to avoid Chocolatey's GNU rustc winning over rustup's MSVC toolchain. Soldr's own toolchain provisioning (via setup-soldr action / rustup) should make this unnecessary, but verify before deleting — particularly on a clean MSYS bash env. If still needed, plumb the env var through the wrapper script that invokes soldr.

Acceptance

  • ./lint and ./test produce zccache cache hits on subsequent runs (check zccache status).
  • ./_cargo, ./_rustc, ./_rustfmt deleted; no remaining references in tree.
  • bash test end-to-end timing on warm cache drops materially vs. current main.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions