33 releases

Uses new Rust 2021

0.11.1 Oct 25, 2022
0.11.0 Sep 27, 2021
0.10.2 May 13, 2021
0.10.0 Mar 10, 2021
0.4.0 Mar 30, 2017

#16 in Testing

Download history 2525/week @ 2022-08-10 2767/week @ 2022-08-17 2729/week @ 2022-08-24 2519/week @ 2022-08-31 3007/week @ 2022-09-07 2939/week @ 2022-09-14 2669/week @ 2022-09-21 3027/week @ 2022-09-28 2589/week @ 2022-10-05 2082/week @ 2022-10-12 2590/week @ 2022-10-19 3365/week @ 2022-10-26 3026/week @ 2022-11-02 3557/week @ 2022-11-09 3415/week @ 2022-11-16 2476/week @ 2022-11-23

12,890 downloads per month


1.5K SLoC

cargo fuzz

A cargo subcommand for fuzzing with libFuzzer! Easy to use!


$ cargo install cargo-fuzz

Note: libFuzzer needs LLVM sanitizer support, so this only works on x86-64 Linux, x86-64 macOS and Apple-Silicon (aarch64) macOS for now. This also needs a nightly compiler since it uses some unstable command-line flags. You'll also need a C++ compiler with C++11 support.

If you have an old version of cargo fuzz, you can upgrade with this command:

$ cargo install -f cargo-fuzz


cargo fuzz init

Initialize a cargo fuzz project for your crate!

cargo fuzz add <target>

Create a new fuzzing target!

cargo fuzz run <target>

Run a fuzzing target and find bugs!

cargo fuzz fmt <target> <input>

Print the std::fmt::Debug output for a test case. Useful when your fuzz target takes an Arbitrary input!

cargo fuzz tmin <target> <input>

Found a failing input? Minify it to the smallest input that causes that failure for easier debugging!

cargo fuzz cmin <target>

Minify your corpus of input files!

cargo fuzz coverage <target>

Generate coverage information on the fuzzed program!


Documentation can be found in the Rust Fuzz Book.

You can also always find the full command-line options that are available with --help:

$ cargo fuzz --help

Trophy case

The trophy case has a list of bugs found by cargo fuzz (and others). Did cargo fuzz and libFuzzer find a bug for you? Add it to the trophy case!


cargo-fuzz is distributed under the terms of both the MIT license and the Apache License (Version 2.0).



~112K SLoC