Crate fuzzcheck[][src]

Expand description

Fuzzcheck is an evolutionary fuzzing engine for Rust functions.

It is recommended to use it with the command line tool cargo-fuzzcheck, which makes it easy to compile your crate with code coverage instrumentation and to manage fuzz targets.

The best way to get started is to follow the guide at

The crate documentation contains information on how to set up and launch a fuzz-test (here) but also documents the core traits (Pool, Sensor, Mutator, etc.) that are useful to understand how it works and to extend it.


Builders used to set up a fuzz test.

Types implementing the Mutator trait.

Types implementing the Sensor and Pool traits.

Types implementing the Serializer trait.


Make a mutator for a custom type, optionally making it the type’s default mutator.


Various arguments given to the fuzzer, typically provided by the cargo fuzzcheck command line tool.

A Serializer for Vec<u8> that simply copies the bytes from/to the files.

A CorpusDelta describes how to reflect a change in the pool’s content to the corpus on the file system.

The result of a fuzz test, if it ends.

The index to a test case in the fuzzer’s storage.


A serializer that uses serde and serde_json to serialize the test inputs (of arbitrary type T: Serializable + for<'e> Deserializable<'e>) to a json file.

A serializer that encodes and decodes values of any type implementing FromStr and ToString into utf-8 encoded text files.



A subtrait of Pool describing how the pool handles observations made by a sensor.

A trait for giving a type a default Mutator

A Mutator is an object capable of generating/mutating a value for the purpose of fuzz-testing.

A trait for types that are basic wrappers over a mutator, such as Box<M>.

A Pool ranks test cases based on observations recorded by a sensor.

A Sensor records information when running the test function, which the fuzzer can use to determine the importance of a test case.

An object safe trait that combines the methods of the Sensor, Pool, and CompatibleWithSensor traits.

A Serializer is used to encode and decode values into bytes.

Describes how to save a list of this value as a CSV file.


Build a fuzz test for the given function!

Derive Macros

Implement a mutator for the type and make it the type’s DefaultMutator.