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§
- builder
- Builders used to set up a fuzz test.
- mutators
- Types implementing the Mutator trait.
- sensors_
and_ pools - Types implementing the Sensor and Pool traits.
- serializers
- Types implementing the Serializer trait.
- subvalue_
provider - Subvalue providers are used by mutators. They help generate interesting test cases by mixing parts of differents values together.
Macros§
- make_
mutator - Make a mutator for a custom type, optionally making it the type’s default mutator.
Structs§
- Arguments
- Various arguments given to the fuzzer, typically provided by the
cargo fuzzcheck
command line tool. - Byte
Serializer - A Serializer for
Vec<u8>
that simply copies the bytes from/to the files. - Corpus
Delta - A CorpusDelta describes how to reflect a change in the pool’s content to the corpus on the file system.
- Fuzzing
Result - The result of a fuzz test, if it ends.
- Pool
Storage Index - The index to a test case in the fuzzer’s storage.
- Serde
Serializer serde_json_serializer
- A serializer that uses
serde
andserde_json
to serialize the test inputs (of arbitrary typeT: Serializable + for<'e> Deserializable<'e>
) to a json file. - String
Serializer - A serializer that encodes and decodes values of any type implementing
FromStr
andToString
into utf-8 encoded text files. - SubValue
Provider Id - Uniquely identifies a
SubValueProvider
Enums§
Traits§
- Compatible
With Observations - A subtrait of Pool describing how the pool handles observations made by a sensor.
- Default
Mutator - A trait for giving a type a default Mutator
- Mutator
- A
Mutator
is an object capable of generating/mutating a value for the purpose of fuzz-testing. - Mutator
Ext - A trait for convenience methods automatically implemented for all types that conform to
Mutator<V>
- Pool
- A
Pool
ranks test cases based on observations recorded by a sensor. - PoolExt
- A trait for convenience methods automatically implemented for all types that conform to Pool.
- Save
ToStats Folder - A trait for types that want to save their content to the
stats
folder which is created after a fuzzing run. - Sensor
- A Sensor records information when running the test function, which the fuzzer can use to determine the importance of a test case.
- Sensor
AndPool - An object safe trait that combines the methods of the
Sensor
,Pool
, andCompatibleWithObservations
traits. - Sensor
Ext - A trait for convenience methods automatically implemented
for all types that conform to
Sensor
. - Serializer
- A Serializer is used to encode and decode test cases into bytes.
- Stats
- A trait implemented by the statistics of a pool
- SubValue
Provider - An object-safe trait which can give values of arbitrary types.
- ToCSV
- Describes how to save a list of this value as a CSV file.
Functions§
- fuzz_
test - Build a fuzz test for the given function!
Derive Macros§
- Default
Mutator - Implement a mutator for the type and make it the type’s
DefaultMutator
.