["check:toolchain"]
description = "mise.toml, rust-toolchain.toml, and rust-version pin the same stable"
shell = "bash -o pipefail -c"
run = [
'[ "$(rustc -V)" = "$(env -u RUSTUP_TOOLCHAIN RUSTUP_AUTO_INSTALL=0 rustc -V)" ] || { echo "✘ mise.toml and rust-toolchain.toml pin different toolchains"; exit 1; }',
'''cargo metadata --no-deps --locked --format-version 1 | jq --arg v "$(rustc -V | cut -d' ' -f2)" '[.packages[] | select(.rust_version != $v) | .name] | if length > 0 then error("✘ rust-version differs from the pinned stable in: \(join(", "))") else empty end' ''',
]
[format]
description = "rustfmt check on the formatting nightly"
run = "cargo +nightly-2026-09-29 fmt --all -- --check"
[lint]
description = "clippy -D warnings"
run = "cargo clippy --locked --all-targets --all-features -- -D warnings"
[test]
description = "Unit and integration tests"
run = "cargo test --locked --all-features --lib --bins --tests"
timeout = "30m"
["test:doc"]
description = "Doc-tests"
run = "cargo test --locked --doc --all-features"
timeout = "30m"
[deny]
description = "License, ban, and source policy (offline)"
run = "cargo deny --locked check licenses bans sources"
["deny:advisories"]
description = "RustSec advisories and yanked crates (network)"
run = "cargo deny --locked check advisories"
[deps]
description = "Unused crate analysis"
run = [
"cargo metadata --locked --format-version 1 > /dev/null",
"cargo-machete --with-metadata",
]
[semver]
description = "Public API changes against the last release (network)"
run = "cargo semver-checks"
[verify]
description = "Toolchain pins, format, lint, feature sets, tests, doc-tests, deny, unused crates, repository checks"
depends = [
"check:toolchain", "format", "lint", "check:features",
"test", "test:doc", "deny", "deps", "check:repo",
]