Skip to content

Remove repo-local _* Rust tool wrappers and call soldr directly #181

Closed

Description

@zackees

Problem

#53 replaced the old Rust toolchain resolution logic with soldr, but the repo still exposes repo-local _cargo, _rustc, and _rustfmt scripts. Those wrappers now mostly add another indirection layer around soldr:

./_cargo   -> uv run soldr cargo "$@"
./_rustc   -> uv run soldr rustc "$@"
./_rustfmt -> uv run soldr rustfmt "$@"

That means developers and agents still have to remember fbuild-specific _ commands even though soldr already solves the underlying problem: selecting the correct rustup-managed toolchain from rust-toolchain.toml via rustup which.

The desired steady state is simpler: fbuild should not require or recommend _cargo, _rustc, _rustfmt, or other repo-specific Rust build tool shims. Use soldr ... directly, with uv run soldr ... where the dev-tool virtualenv is needed.

Proposed fix

  1. Update docs and agent guidance to prefer direct soldr commands:

    • uv run soldr cargo ...
    • uv run soldr rustc ...
    • uv run soldr rustfmt ...
    • uv run soldr clippy-driver ...
  2. Remove _cargo, _rustc, and _rustfmt if no CI/job/script still depends on them.

  3. Update any scripts, docs, hooks, or examples that mention _cargo, _rustc, or _rustfmt.

  4. Keep soldr responsible for maintaining the correct Rust tool version by resolving through rustup and the checked-in rust-toolchain.toml.

Acceptance criteria

  • rg "_cargo|_rustc|_rustfmt" has no remaining user-facing recommendations, except historical references if explicitly needed.
  • _cargo, _rustc, and _rustfmt are removed, or any remaining wrapper has a documented compatibility reason and is no longer recommended.
  • CI and local docs use uv run soldr ... / soldr ... directly.
  • ci/hooks/tool_guard.py continues to allow soldr ... and does not require repo-local _ tools.
  • uv run soldr cargo check --workspace --all-targets works as the canonical Rust check command.

Related

Activity

  1. zackees commented on Apr 22, 2026

    @zackees
    MemberAuthor

    Additional requirement: update the agent/tool hooks as part of this issue.

    Today ci/hooks/tool_guard.py allows Rust commands through uv run ..., soldr ..., and the repo-local _cargo / _rustc / _rustfmt compatibility wrappers. Once this cleanup lands, the hooks should require direct soldr usage for Rust tooling and stop treating the _ wrappers as an accepted path.

    Expected hook behavior:

    • Allow soldr cargo ..., soldr rustc ..., soldr rustfmt ..., soldr clippy-driver ....
    • Allow uv run soldr cargo ... and equivalent uv run soldr <tool> ... forms when running through the dev-tool environment.
    • Reject bare cargo, rustc, rustfmt, and clippy-driver as today.
    • Reject or no longer document _cargo, _rustc, and _rustfmt after those files are removed.
    • Update ci/hooks/test_tool_guard.py and hook docs so the enforced workflow matches the new canonical commands.
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions