| Crates.io | cargo-fuzz |
| lib.rs | cargo-fuzz |
| version | 0.13.1 |
| created_at | 2017-02-21 06:09:31.752437+00 |
| updated_at | 2025-06-27 16:48:40.9905+00 |
| description | A `cargo` subcommand for fuzzing with `libFuzzer`! Easy to use! |
| homepage | |
| repository | https://github.com/rust-fuzz/cargo-fuzz/ |
| max_upload_size | |
| id | 8616 |
| size | 159,068 |
cargo fuzzA 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 and Aarch64,
and only on Unix-like operating systems (not Windows). 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.
cargo fuzz initInitialize a cargo fuzz project for your crate!
fuzz directory to workspace.members in root Cargo.tomlfuzz directory can be either a part of an existing workspace (default)
or use an independent workspace. If latter is desired, you can use
cargo fuzz init --fuzzing-workspace=true.
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
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).
See LICENSE-APACHE and LICENSE-MIT for details.