CheckOps
cargo-mutants
cargo-mutants is an MIT-licensed mutation testing tool for Rust that injects bugs into your code and reports which ones your tests miss, with nextest support, sharding and diff-based runs.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
cargo-mutants helps you improve your Rust program’s tests by finding places where bugs could be inserted without any tests failing. It generates mutants, for example replacing a function body with a default return value or swapping binary operators, builds each, and runs your tests. Mutants that are not caught (“missed”) highlight weak tests or untested behaviour.
It needs no changes to your source code: install the cargo subcommand and run cargo mutants in a workspace. Results are written to a mutants.out directory with lists of caught, missed, unviable and timed-out mutants and diffs. Options include running tests with cargo-nextest (--test-tool nextest), parallel jobs, sharding across CI machines (--shard), testing only code changed in a diff (--in-diff), excluding functions with attributes or config, and timeouts. Its documentation at mutants.rs includes CI recipes. Version 27.1.0 was released on 2 June 2026, with commits in October 2026.
The source code is at sourcefrog/cargo-mutants on GitHub under the MIT licence, with about 1,400 stars; the most recent commit was on 19 October 2026.
Features
- No source changes: Works on existing Rust projects.
- Clear outcomes: Caught, missed, unviable and timeout lists.
- CI-friendly: Sharding, diff-only runs and nextest support.
- Configurable: Exclude functions and files.
Pros
- Free to use: Open source under the MIT licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 19 October 2026.
Cons
- Build-heavy: Each mutant requires compilation, so full runs take time.
- Interpreting results: Some missed mutants are equivalent and need judgement.
Usage and Links (Example)
cargo install --locked cargo-mutants
cargo mutants
cargo mutants --test-tool nextest -j 4
git diff origin/main > pr.diff && cargo mutants --in-diff pr.diff
Resources:
Pricing
cargo-mutants is free and open source under the MIT licence.
Recommended for?
- Rust teams wanting to measure how strong their tests are.
- CI pipelines checking mutants only in changed code.
Conclusion
cargo-mutants makes mutation testing practical for Rust, with zero setup and good CI support.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with cargo-mutants side by side.
Ccargo-nextestcargo-nextest is an Apache-2.0 next-generation test runner for Rust, up to 3x faster than cargo test per its site, with per-test process isolation, retries, partitioning, JUnit output and a filterset DSL.Compare with cargo-mutants
Pproptestproptest is a Hypothesis-inspired property-based testing framework for Rust, with composable strategies, automatic shrinking and persisted regression files.Compare with cargo-mutants
SStrykerJSStrykerJS is the Apache-2.0 mutation testing framework for JavaScript and TypeScript, part of the Stryker Mutator family (with Stryker.NET and Stryker4s), supporting Jest, Vitest, Mocha, Karma and more.Compare with cargo-mutants
PPIT (Pitest)PIT (Pitest) is an Apache-2.0 state-of-the-art mutation testing system for Java and the JVM that mutates bytecode to measure how well your tests detect faults, with Maven and Gradle plugins and HTML reports.Compare with cargo-mutants
Mmutmutmutmut is a BSD-3-Clause mutation testing tool for Python that changes your code in small ways and reports which mutants your tests fail to kill, with a terminal UI for browsing results.Compare with cargo-mutants
Ccargo-llvm-covcargo-llvm-cov is a cargo subcommand (Apache-2.0 or MIT) for LLVM source-based code coverage in Rust, supporting cargo test, cargo run and cargo nextest with precise line and region coverage.Compare with cargo-mutants