rust-tools¶
Rust CI image: rustup toolchain + clippy/rustfmt/llvm-tools, cargo-nextest/llvm-cov/deny/audit. Derives from ci-base.
Release v0.2.5, 2026-11-04. Built on ci-base. Source: phpboyscout/images/rust-tools.
Pin it¶
Pin the full version. Each release also moves its minor tag and latest, which change under you.
| Variant | Tags |
|---|---|
| default | v0.2.5, v0.2 |
About this image¶
The Rust track's CI image.
Contains the rustup toolchain with clippy, rustfmt and llvm-tools-preview,
plus cargo-nextest, cargo-llvm-cov, cargo-deny, cargo-audit,
cargo-semver-checks and release-plz, on top of
ci-base.
Serves rust-lint, rust-test, rust-docs, rust-security and release-plz.
Why it exists¶
| size | findings | |
|---|---|---|
dev-tools |
977 MB | 66 gate-visible |
rust-tools |
589 MB | 0 |
That second column is the point. A Rust repository used to pull 2.7 GB and
inherit all 66 of dev-tools' gate-visible findings — not one of which came
from Rust. They were goreleaser-pro, golangci-lint, syft, goreleaser and
Node: tooling a Rust project never invokes.
Measured in isolation, this toolchain has zero findings of any severity.
This is the image that made glibc non-negotiable¶
cargo-binstall runs with --disable-strategies compile: prebuilt binaries
only, no source fallback, by deliberate design. Without that flag a failed
prebuilt fetch silently falls back to a source build, which then fails anyway
because cargo-nextest refuses to compile without --locked — turning a clear
network error into a confusing compile error.
Those prebuilt artefacts are x86_64-unknown-linux-gnu. On a musl base they
simply do not run, and there is no source path to fall back to. That is why
Alpine and Docker Hardened Images' musl line were ruled out in
spec 0074
D2, and why Wolfi — glibc 2.43 — was the only viable hardened base.
It keeps cargo-binstall, where the other images dropped their resolver¶
tofu-tools and go-tools removed mise in favour of direct downloads with
checksum verification. This image deliberately does the opposite, and the
reason is checkable rather than a preference:
| tool | direct asset | checksum published |
|---|---|---|
| cargo-deny | ✓ | ✓ |
| cargo-nextest | ✓ | ✗ |
| cargo-llvm-cov | ✓ | ✗ |
| cargo-audit | ✓ | ✗ |
| cargo-semver-checks | ✓ | ✗ |
| release-plz | ✓ | ✗ |
Downloading these directly would mean five unverified fetches. cargo-binstall resolves through crates.io metadata and supports publisher signatures, so here the resolver is the better supply chain — not merely the more convenient one. The Rust ecosystem largely does not publish checksum sidecars, and binstall is its answer to that.
binstall is also kept in the image rather than removed after use. The Linux
jobs do not need it — rust-test and rust-security call the baked binaries
directly — but rust-test's macOS and Windows jobs bootstrap it on their own
runners, and a consumer adding a cargo tool through extra_before_script will
reach for it.
It runs as root¶
Like go-tools, and unlike
ci-base, tofu-tools, docs-tools and node-tools.
GitLab's helper checks out /builds as root, and rust-tool-base seeds
/etc/machine-id for an rtb-telemetry test — neither of which a non-root user
can do.
Baked components, and why the runtime rustup component add stays¶
clippy, rustfmt and llvm-tools-preview are baked so rust-lint and the coverage
job skip rustup component add at runtime.
The components still call it, deliberately: a consumer's rust-toolchain.toml
makes rustup install a different toolchain at job time, which then needs its
own components. rustup component add is a fast local no-op when they are
already present, and a correctness safeguard when the toolchain is overridden.
The scan is split by who can fix it¶
| Job | Scope | Gate |
|---|---|---|
scan:os |
OS/apk packages — the base and anything we install | hard |
scan:tools |
the rustup toolchain and the prebuilt cargo binaries | advisory |
scan:tools measures zero today, but stays advisory rather than hard: these
are pinned prebuilt third-party binaries, so a future finding is cleared by that
upstream publishing a release, not by anything this repository can do. That is
the same reasoning as go-tools, and the opposite of docs-tools, where pip
resolves the tree fresh at build time and a fix arrives on the next rebuild.
Design record¶
Everything installed¶
Contents not yet published. This image's releases do not carry an SBOM yet. Until they do, the README above describes what it adds, and the Dockerfile is the full record.