
cargo-fuzz
Summary
cargo-fuzz is a free, open-source Cargo subcommand for fuzzing Rust code with libFuzzer. It invokes a fuzzer rather than providing one itself, and the Rust Fuzz Book recommends it for Rust fuzz testing. Run `cargo fuzz init` to set up fuzzing files for a crate, then `cargo fuzz add <target>` to make a target and `cargo fuzz run <target>` to search for bugs. The tool can minimize a failing input or a corpus of inputs, and version 0.10.0 or newer can generate source-based coverage information. Its documentation includes structure-aware fuzzing and a GitHub Actions workflow for running targets in CI. Supported systems listed include x86-64 Linux, x86-64 and Apple-Silicon macOS, and Windows with LLVM sanitizer support; Windows programs can also use MSVC AddressSanitizer. The project requires the nightly Rust compiler because it uses a `-Z` compiler flag for address sanitization, as well as a C++ compiler with C++11 support. It is distributed under the MIT and Apache 2.0 licenses.
Who it is for
cargo-fuzz suits Rust developers who want to search their code for bugs using fuzz targets. It fits teams that can use a nightly Rust compiler and a C++11-capable compiler, including those running fuzzing in CI.
What is good
- Creates and runs fuzz targets for Rust crates
- Can minimize failing inputs and input corpora
- Supports structured fuzzing
- Documentation includes a GitHub Actions workflow
What to know first
- Requires the nightly Rust compiler
- Requires a C++ compiler with C++11 support
Verdict
cargo-fuzz provides a command-line workflow for creating targets, running libFuzzer, and managing fuzzing inputs. Check its compiler requirements and supported system setup before incorporating it into a project.
cargo-fuzz plans and pricing
All plansCompared on fuzz testing software
- Input generation methods
- mutation, generation, hybridgithub.com
- Target types
- raw byte buffers, structured Rust data, libraries, APIs, compiler code, allocator operationsgithub.com
- Coverage guidance
- Yesgithub.com
- Crash triage
- Yesgithub.com
- Execution mode
- localgithub.com
- Supported languages
- Rustgithub.com
- CI/CD support
- Yesgithub.com
Facts
- Purpose
- cargo-fuzz is a cargo subcommand for fuzzing with libFuzzer.github.com · 1 Oct 2026
- Recommended use
- The Rust Fuzz Book calls cargo-fuzz the recommended tool for fuzz testing Rust code.rust-fuzz.github.io · 1 Oct 2026
- Fuzzer support
- cargo-fuzz invokes a fuzzer rather than being a fuzzer itself, and currently supports libFuzzer through the libfuzzer-sys crate.rust-fuzz.github.io · 1 Oct 2026
- Installation
- The documented installation command is `cargo install cargo-fuzz`.rust-fuzz.github.io · 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 · 1 Oct 2026
- Build requirement
- A C++ compiler with C++11 support is required.rust-fuzz.github.io · 1 Oct 2026
- Supported systems
- The setup documentation lists x86-64 Linux, x86-64 macOS, Apple-Silicon macOS, and Windows with LLVM sanitizer support.rust-fuzz.github.io · 1 Oct 2026
- Project setup
- `cargo fuzz init` creates fuzzing files for a crate, and `cargo fuzz add <target>` creates a new fuzzing target.github.com · 1 Oct 2026
- Fuzz execution
- `cargo fuzz run <target>` runs a fuzzing target to find bugs.github.com · 1 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 · 1 Oct 2026
- Coverage
- `cargo fuzz coverage` generates source-based code coverage information and requires cargo-fuzz version 0.10.0 or newer.rust-fuzz.github.io · 1 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 · 1 Oct 2026
- Windows integration
- cargo-fuzz can fuzz Windows programs using MSVC AddressSanitizer.rust-fuzz.github.io · 1 Oct 2026
- Licensing
- cargo-fuzz is distributed under both the MIT license and Apache License Version 2.0.github.com · 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 · 1 Oct 2026
- Platforms
- The setup documentation lists x86-64 Linux, x86-64 macOS, Apple-Silicon macOS, and Windows support.rust-fuzz.github.io · 2 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 · 2 Oct 2026
- Corpus minimization
- cargo fuzz tmin minimizes a failing input and cargo fuzz cmin minimizes a corpus of input files.github.com · 2 Oct 2026
- Structured fuzzing
- The documentation supports structure-aware fuzzing through the fuzz_mutator! macro and the Arbitrary trait.rust-fuzz.github.io · 2 Oct 2026
- Configuration
- Fuzz targets can use Cargo feature options including --features, --no-default-features, and --all-features.rust-fuzz.github.io · 2 Oct 2026
- Security status
- GitHub reports that the repository has no security policy detected and no published security advisories.github.com · 2 Oct 2026
Best cargo-fuzz alternatives
See all 12Where it ranks on Everything Xiaomi
Is cargo-fuzz yours?
Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.
Sources
- github.com/rust-fuzz/cargo-fuzz· checked 1 Oct 2026
- rust-fuzz.github.io/book/cargo-fuzz.html· checked 1 Oct 2026
- rust-fuzz.github.io/book/cargo-fuzz/setup.html· checked 1 Oct 2026
- rust-fuzz.github.io/book/cargo-fuzz/coverage.html· checked 1 Oct 2026
- rust-fuzz.github.io/book/cargo-fuzz/ci.html· checked 1 Oct 2026
- rust-fuzz.github.io/book/cargo-fuzz/windows.html· checked 1 Oct 2026
- github.com/rust-fuzz/cargo-fuzz/blob/main/Cargo.to· checked 1 Oct 2026
- rust-fuzz.github.io/book/cargo-fuzz/structure-aware-fuzzing· checked 2 Oct 2026
- rust-fuzz.github.io/book/cargo-fuzz/guide.html· checked 2 Oct 2026
- github.com/rust-fuzz/cargo-fuzz/security· checked 2 Oct 2026

