Verification · Formal · Undefined-behaviour detection
Interpreter-based checking
Run tests under an interpreter that tracks every pointer (Miri).
How to build it
- Install the miri component with rustup on the CI runner.
- Run cargo miri test on the crates and test subset that contain unsafe code.
- Run Miri as its own CI job and fail the job on any reported undefined behaviour.
Signals in a repository
- A cargo miri test step in a workflow, with MIRIFLAGS set in the CI environment.
- Test modules gated with cfg(miri) to skip code Miri cannot run.
In practice
4 repositories run a tool for this check in the scanned set.
miri· 4 repos
Examples
-
zed-industries/zed ·
miricargo miri clean -
pola-rs/polars ·
miricargo miri setup -
tokio-rs/tokio ·
miricargo miri nextest run --features full --lib --no-fail-fast -
sst/opencode ·
miricargo miri setup