Sign inSign up

stden/rust-ci

By stden

•Updated 4 days ago

Run Rust tests, code checks, dependency audits, and cached builds in CI.

Image
Languages & frameworks
Integration & delivery
Developer tools
0

94

stden/rust-ci repository overview

⁠stden/rust-ci

Run Rust tests, code checks, dependency audits, and cached builds in CI.

⁠Overview

This image extends the current stable Rust toolchain with CI tools:

  • Cargo, rustfmt, Clippy, and LLVM coverage tools.
  • Nextest to run tests and cargo-audit to check dependencies.
  • sccache to cache compiler output.
  • Clang, LLD, mold, Git, jq, OpenSSL headers, and pkg-config.

The default working directory is /workspace. The default command is Bash.

⁠Tags

TagContentsPlatform
latestLatest successful build from mainlinux/amd64

The latest tag changes after a new build passes its tests. See all tags and digests⁠.

⁠Use

docker pull stden/rust-ci:latest
docker run --rm -v "$PWD":/workspace stden/rust-ci:latest \
  bash -c 'cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo nextest run'
docker run --rm -v "$PWD":/workspace stden/rust-ci:latest cargo audit

Run these commands from a project directory that contains Cargo.toml. cargo audit checks Cargo.lock and needs access to the advisory database. Cargo downloads your project dependencies when needed. The image does not contain them.

Use a named volume to keep the compiler cache between runs:

docker run --rm -v "$PWD":/workspace -v rust-ci-cache:/cache \
  -e RUSTC_WRAPPER=sccache -e SCCACHE_DIR=/cache -e CARGO_INCREMENTAL=0 \
  stden/rust-ci:latest cargo build --release

Build output stays in the mounted project directory. Files created by the container belong to root. LLD and mold are installed. Configure your project to select a linker if needed.

⁠Checks

The smoke test runs Nextest, rustfmt, Clippy, and a real compiler cache check. It checks LLVM tools and compiles programs with LLD and mold. It checks the cargo-audit command without downloading an advisory database.

⁠Source

Tag summary

Content type

Image

Digest

sha256:c9ef79e87…

Size

866.8 MB

Last updated

4 days ago

docker pull stden/rust-ci