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 fuzzcheck.neocities.org.
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.
Modules
Builders used to set up a fuzz test.
Types implementing the Serializer trait.
Subvalue providers are used by mutators. They help generate interesting test cases by mixing parts of differents values together.
Macros
Make a mutator for a custom type, optionally making it the type’s default mutator.
Structs
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.
serde_json_serializer
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.
Uniquely identifies a SubValueProvider
Enums
Traits
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 convenience methods automatically implemented for all types that conform to Mutator<V>
A trait for convenience methods automatically implemented for all types that conform to Pool.
A trait for types that want to save their content to the stats
folder which is created after a fuzzing run.
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 CompatibleWithObservations
traits.
A trait for convenience methods automatically implemented
for all types that conform to Sensor
.
A Serializer is used to encode and decode test cases into bytes.
A trait implemented by the statistics of a pool
An object-safe trait which can give values of arbitrary types.
Describes how to save a list of this value as a CSV file.
Functions
Build a fuzz test for the given function!
Derive Macros
Implement a mutator for the type and make it the type’s DefaultMutator
.