Saturday, October 24, 2026 4,350 lists 78,096 records on file
List your app or device

  1. Home
  2. Fuzz Testing Software
  3. cargo-fuzz

cargo-fuzz

What it is

cargo-fuzz is a free, open-source Cargo subcommand for fuzzing Rust code. It invokes libFuzzer through the libfuzzer-sys crate rather than acting as a fuzzer itself. To begin, `cargo fuzz init` creates fuzzing files for a crate, and `cargo fuzz add ` creates a target; `cargo fuzz run ` runs it to look for bugs. The tool can minimize a failing input or an input corpus, and version 0.10.0 or newer can generate source-based coverage information. Documentation also covers structure-aware fuzzing using `fuzz_mutator!` and `Arbitrary`, Cargo feature options, and a GitHub Actions workflow for running targets in CI. Supported setups include x86-64 Linux, x86-64 and Apple-Silicon macOS, and Windows with LLVM sanitizer support; Windows programs can also be fuzzed using MSVC AddressSanitizer. It requires the nightly Rust compiler and a C++11-capable compiler. The Rust Fuzz Book names it as its recommended tool for fuzz testing Rust code.

For and against

For

  • Creates fuzzing files and targets with Cargo commands
  • Minimizes failing inputs and input corpora
  • Generates source-based coverage from version 0.10.0
  • Supports structure-aware fuzzing and Cargo feature options
  • Free and open source under MIT and Apache 2.0

Against

  • Requires the nightly Rust compiler
  • Requires a C++ compiler with C++11 support
  • Coverage requires cargo-fuzz 0.10.0 or newer

The verdict

cargo-fuzz provides a Cargo-based way to run libFuzzer against Rust targets, with input minimization, coverage, and CI guidance. Check its nightly Rust and C++11 build requirements before setting it up.

Who it suits

Rust developers who want to find bugs in code through local fuzzing may find cargo-fuzz useful. Its documented CI workflow and input minimization also suit projects that need repeatable fuzz runs and crash triage.

Plans and prices

cargo-fuzz

Free

MIT license · Apache License (Version 2.0)

Every plan, in full

On the record

Build requirement
The setup requires a C++ compiler with C++11 support.rust-fuzz.github.io · read 2 Oct 2026
CI integration
The documentation provides a GitHub Actions workflow that installs cargo-fuzz, builds targets, runs them for a configured time, and uploads artifacts on failure.rust-fuzz.github.io · read 1 Oct 2026
Compiler requirement
The project requires the nightly Rust compiler because it uses the -Z compiler flag for address sanitization.rust-fuzz.github.io · read 2 Oct 2026
Configuration
Fuzz targets can use Cargo feature options including --features, --no-default-features, and --all-features.rust-fuzz.github.io · read 2 Oct 2026
Corpus minimization
cargo fuzz tmin minimizes a failing input and cargo fuzz cmin minimizes a corpus of input files.github.com · read 2 Oct 2026
Coverage
cargo fuzz coverage generates source-based code coverage information from a fuzz target and corpus.rust-fuzz.github.io · read 2 Oct 2026
Fuzzer support
cargo-fuzz is a tool to invoke a fuzzer, and currently supports only libFuzzer through the libfuzzer-sys crate.rust-fuzz.github.io · read 2 Oct 2026
Fuzz execution
`cargo fuzz run <target>` runs a fuzzing target to find bugs.github.com · read 1 Oct 2026
Fuzz targets
cargo fuzz add creates a new fuzzing target and cargo fuzz run runs a fuzzing target to find bugs.github.com · read 2 Oct 2026
Input minimization
The tool provides `cargo fuzz tmin` to minimize a failing input and `cargo fuzz cmin` to minimize a corpus of input files.github.com · read 1 Oct 2026
Installation
The documented installation command is cargo install cargo-fuzz.rust-fuzz.github.io · read 2 Oct 2026
Licensing
cargo-fuzz is distributed under both the MIT license and Apache License Version 2.0.github.com · read 1 Oct 2026
Package metadata
The Cargo package is version 0.13.2 and lists its authors as The rust-fuzz Project Developers.github.com · read 1 Oct 2026
Project setup
cargo fuzz init initializes a cargo-fuzz project for a crate.github.com · read 2 Oct 2026
Purpose
cargo-fuzz is a cargo subcommand for fuzzing with libFuzzer.github.com · read 2 Oct 2026
Recommended use
The Rust Fuzz Book describes cargo-fuzz as the recommended tool for fuzz testing Rust code.rust-fuzz.github.io · read 2 Oct 2026
Security status
GitHub reports that the repository has no security policy detected and no published security advisories.github.com · read 2 Oct 2026
Structured fuzzing
The documentation supports structure-aware fuzzing through the fuzz_mutator! macro and the Arbitrary trait.rust-fuzz.github.io · read 2 Oct 2026

Alternatives to cargo-fuzz

Every alternative, ranked