Quick Start¶
1. Install¶
Rust 1.85 or later is required.
2. Run against your crate¶
Each mutant prints Killed when tests detect it, or Escaped when tests miss
it. An escaped mutant also prints a source diff.
3. Add coverage awareness¶
Without --coverage, uncovered source can lower the total score. With
--coverage, mutants on untested lines get the not covered state. The
covered-code score ignores those mutants.
Install cargo-llvm-cov and the llvm-tools-preview component first. See the
command guide.
4. Set quality gates¶
Exit value 4 means a gate failed. Exit value 0 means all gates passed.
5. Reduce noise¶
Use --quiet to show only escaped mutants and the summary:
6. Limit to changed lines¶
mutarust \
--git-diff-lines \
--git-diff-base main \
--ignore-msi-with-no-mutations \
--min-msi 75 \
.
7. Get agent-ready suggestions¶
Feed mutarust-agentic.json to an agent for targeted test suggestions.