1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# The standard Rust tasks every ctl repository runs. A repository includes
# this file at a pinned ctl-core release, after any other includes:
#
# [settings]
# experimental = true # mise loads git:: task includes only with this on
#
# [task_config]
# includes = [
# "git::https://github.com/victor-software-house/ctl-core.git//tasks/rust.toml?ref=v0.6.14",
# ]
#
# The repository defines `check:features` and `check:repo` itself; `verify`
# depends on both. `check:repo` holds the repository's own checks, and does
# nothing in a repository that has none.
# Every task that resolves dependencies passes --locked, so a Cargo.lock that
# no longer matches Cargo.toml fails verify here, as it fails a release build
# that passes --locked. A repository's own cargo commands, such as those in
# check:features, pass it too.
# Its mise.toml pins the tools these tasks call, including the stable
# compiler and the formatting nightly named in `format`. Bump the ref and
# those pins together.
[]
= "mise.toml, rust-toolchain.toml, and rust-version pin the same stable"
# pipefail: a failing cargo metadata or jq must fail the task, not pass it.
= "bash -o pipefail -c"
= [
'[ "$(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' ''',
]
[]
= "rustfmt check on the formatting nightly"
= "cargo +nightly-2026-09-29 fmt --all -- --check"
[]
= "clippy -D warnings"
# --workspace in lint, test, and test:doc: without it cargo selects the
# default members, which is only the root package of a workspace with one, or
# the default-members list, so the other members would go unchecked.
= "cargo clippy --locked --workspace --all-targets --all-features -- -D warnings"
[]
= "Unit and integration tests"
# --tests selects every target whose `test` flag is on, bins included. --bins
# would select every bin regardless of the flag, so a fuzz target with
# `test = false` would build and run as a test.
= "cargo test --locked --workspace --all-features --lib --tests"
# Stops a hung test run instead of holding the gate. The limit also counts
# compile time and waits on the target/ lock, so it sits far above a cold build.
= "30m"
[]
= "Doc-tests"
= "cargo test --locked --workspace --doc --all-features"
= "30m"
[]
= "License, ban, and source policy (offline)"
= "cargo deny --locked check licenses bans sources"
[]
= "RustSec advisories and yanked crates (network)"
= "cargo deny --locked check advisories"
[]
= "Unused crate analysis"
# cargo-machete calls cargo metadata without --locked, which would rewrite a
# stale Cargo.lock while sibling tasks run. The locked metadata call fails
# first, so no task in verify ever writes the lock.
= [
"cargo metadata --locked --format-version 1 > /dev/null",
"cargo-machete --with-metadata",
]
# Published crates only. CI runs it before packaging; it compares against the
# release on crates.io.
[]
= "Public API changes against the last release (network)"
= "cargo semver-checks"
[]
= "Toolchain pins, format, lint, feature sets, tests, doc-tests, deny, unused crates, repository checks"
= [
"check:toolchain", "format", "lint", "check:features",
"test", "test:doc", "deny", "deps", "check:repo",
]