Skip to content

Add the Rust workspace, toolchain pin and CI gates #705

Done

Description

@pithead-developer

What's the problem

There is no Rust in the repo: no Cargo.toml, rust-toolchain.toml or deny.toml, and no CI gate for Rust code. Existing gates assume Bash (file-budget ratchet in scripts/lint-file-budget.sh, pinned-tool watch in .github/workflows/tool-bump.yml, .github/dependabot.yml).

What it impacts

Every later port slice. Rigs and the appliance are untouched.

How I found it

Survey of the repo at ea41133: Makefile, .github/workflows/, lint scripts. No Rust files or config exist.

How important is it

Blocks every other Rust issue; no product risk, nothing ships from it.

Acceptance criteria

  • A cargo workspace with a library crate and a binary crate (names are an implementation choice) is committed with Cargo.lock, a rust-toolchain.toml pinning the channel with rustfmt, clippy and the x86_64-unknown-linux-musl target, and an MSRV in rust-version that a CI job checks.
  • CI jobs exist and pass: cargo fmt --all -- --check, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, cargo deny check (advisories, licenses, bans, sources) from a committed deny.toml, and a --locked static musl build whose output is asserted statically linked. Makefile targets wrap each and join make check.
  • New workflow jobs follow existing conventions (SHA-pinned actions, persist-credentials: false, contents: read); zizmor passes. Pinned Rust tools are registered with tool-bump.yml and Dependabot gains a cargo entry.
  • Cargo.lock is exempt from scripts/lint-file-budget.sh with a selftest case, /target/ is gitignored, the rule for .rs files is in CONTRIBUTING.md, and no ceiling in docs/dev/file-budget.tsv is raised.
  • No existing file under tests/ is modified. make check and make lint-topology pass.

Possible solutions

  • Rust coverage via cargo-llvm-cov or tarpaulin with a floor file like tests/coverage-floor.txt; optional, decided in a follow-up. How the kcov floor and patch gate treat shrinking Bash is unknown and goes in the ledger.
  • aarch64 target added only if the owner confirms support (see the distribution ADR).

Activity

  1. added this to the v1.20.0 milestone on Nov 17, 2026
  2. added
    infra
    testing
    P4-code-health
    size:M
    on Nov 17, 2026
  3. pithead-developer commented on Nov 17, 2026

    @pithead-developer
    ContributorAuthor

    Owner ruling 2026-11-17: x86_64 (x86_64-unknown-linux-musl) is the main target and its build is a required gate. aarch64 (aarch64-unknown-linux-musl) is best effort: built in a separate, non-required CI job and published as a release asset when it builds; an aarch64 failure never blocks a merge or a release. The release zip and tar.gz carry the binary for each architecture that built, listed in SHA256SUMS.

  4. pithead-developer commented on Nov 17, 2026

    @pithead-developer
    ContributorAuthor

    Owner support policy and packaging pattern, 2026-11-17:

  5. added
    operator-hold
    and removed
    operator-hold
    on Nov 24, 2026
  6. pithead-developer commented on Nov 25, 2026

    @pithead-developer
    ContributorAuthor

    Merged in #851.

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

    P4-code-healthinfrasize:Mtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions