EVERYTHING XIAOMI
Get listed

muttest-rs

muttest-rs is a free, MIT-licensed Rust tool for evaluating whether tests detect simulated code changes.

Place
#24 of 25
Score
5.2
muttest-rs's website

What muttest-rs is

muttest-rs is a free, MIT-licensed Rust tool for evaluating whether tests detect simulated code changes. Its mutation process changes selected code, runs a Rust/Cargo test suite, and reports mutations that survive. Setup installs the `cargo-muttest` Cargo plugin and adds `muttest` as a crate dependency. For library analysis, users annotate code and test modules, run `cargo muttest --lib`, and inspect the JSON report at `target/muttest/report.json`. Integration tests can be included by making `muttest` optional, guarding attributes with the `muttest` feature, and running `cargo muttest` without `--lib`. The `#[mutate]` macro transforms selected source patterns and adds runtime hooks, allowing mutations after one compilation. It can mutate runtime-executed expressions, but not const or static definitions, const functions, macros or their arguments, patterns, or types. Only top-level module items can receive the annotation. An optional Cargo profile uses optimization level 3 and link-time optimization. Debug logging is available through `RUST_LOG=debug`, and the project advises keeping muttest out of release code.

Good

  • Free and MIT licensed
  • Produces JSON surviving-mutant reports
  • Supports library and integration tests
  • Enables runtime mutation after one compilation
  • Offers optional optimized analysis profile

Watch out

  • Cannot mutate several Rust constructs
  • Annotations are limited to top-level module items
  • Requires Cargo plugin and crate setup
  • Should not affect release code

Who it suits

It suits Rust crate developers using Cargo tests to assess test detection of code changes. It is useful when surviving-mutant reports are part of the review process.

Verdict

muttest-rs provides a focused mutation-analysis workflow for Rust projects, including reports and runtime mutation hooks. Its documented exclusions and annotation limits should be checked against the codebase before adoption.

The facts

Each one read from muttest-rs's own pages, with the date it was checked.

What it does

Annotation limit
Only top-level items in modules can be annotated with `#[mutate]`.checked 4 Oct 2026
Annotation limits
For technical reasons, only top-level items in modules can be annotated with `#[mutate]`.checked 9 Oct 2026
Debugging
Setting `RUST_LOG=debug` displays the commands executed during mutation analysis.checked 4 Oct 2026
How it works
Its `#[mutate]` macro transforms source code patterns and adds hooks so mutations can be enabled at runtime after a single compilation.checked 9 Oct 2026
Installation
The README instructs users to install the `cargo-muttest` Cargo plugin and add `muttest` to their crate.checked 9 Oct 2026
Integration tests
The README says integration test analysis uses `muttest` as an optional dependency and runs `cargo muttest` without `--lib`.checked 9 Oct 2026
Intended users
The documented setup is for Rust crate developers who want to assess how well their tests detect code changes.checked 9 Oct 2026
License
The repository includes an MIT license that permits use, copying, modification, distribution, sublicensing, and sale subject to its terms.checked 9 Oct 2026
Mutatable code
The tool can mutate runtime-executed expressions, but not const or static definitions, const functions, macros and their arguments, patterns, or types.checked 4 Oct 2026
Mutation limits
It cannot mutate const or static definitions, `const fn`s, macros or their arguments, patterns, or types.checked 9 Oct 2026
Performance
The README documents an optional `muttest` profile with optimization level 3 and LTO to optimize the test suite during mutation analysis.checked 9 Oct 2026
Performance option
The README describes an optional Cargo `muttest` profile with optimization level 3 and link-time optimization for mutation analysis dominated by mutant evaluation.checked 4 Oct 2026
Purpose
muttest-rs is a Rust mutation testing tool for evaluating whether a test suite catches simulated bugs.checked 9 Oct 2026
Release-code guidance
The README instructs users to ensure muttest does not affect release code.checked 4 Oct 2026
Reports
The tool writes a JSON report to `target/muttest/report.json`.checked 9 Oct 2026
Runtime mutation
The `#[mutate]` macro transforms selected source patterns and inserts hooks to enable mutations at runtime, allowing the code to be compiled once.checked 4 Oct 2026
Test setup
For library tests, the README shows annotating code and test modules, then running `cargo muttest --lib`.checked 9 Oct 2026
Unit test workflow
For library mutation analysis, the README directs users to annotate code and test modules, run `cargo muttest --lib`, and inspect `target/muttest/report.json`.checked 4 Oct 2026

Alternatives to muttest-rs

All alternatives
  1. 1

    Mutatest

    Free planOpen sourceAPILinuxmacOSSelf-hosted
    7.2Free plan
  2. 2ArcMutate logo

    ArcMutate

    Free planLinuxmacOSSelf-hostedWindows
    6.7From $8 a month
  3. 3

    Mutant

    Free planLinuxmacOS
    6.7From $250 a year
  4. 4

    MuJava

    Free planLinuxmacOSWindows
    6.3Free plan
  5. 5

    pymute

    Free planLinux
    6.3Free plan
  6. 6

    go-mutesting

    Free planLinuxSelf-hosted
    6.2Free plan