dev-fuzz 0.1.0

Fuzzing harness integration for Rust. Wraps cargo-fuzz. Findings emitted as machine-readable reports. Part of the dev-* verification suite.
Documentation
  • Coverage
  • 100%
    31 out of 31 items documented1 out of 14 items with examples
  • Size
  • Source code size: 48.34 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 657.69 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • jamesgober/dev-fuzz
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jamesgober

What it does

dev-fuzz wraps cargo-fuzz (libFuzzer-based) and emits findings as dev-report::Report. Each finding carries a reproducer path so the crash can be replayed and debugged.

What is fuzzing?

Fuzzing feeds random or guided-random inputs to your code looking for crashes, panics, or unexpected behavior. It's the standard tool for:

  • Parsers
  • Deserializers
  • Network protocol handlers
  • Anything that takes untrusted bytes

A typical fuzz session runs for minutes to hours and feeds billions of inputs through the target.

Quick start

[dependencies]
dev-fuzz = "0.9"
use dev_fuzz::{FuzzRun, FuzzBudget};
use std::time::Duration;

let run = FuzzRun::new("parse_input", "0.1.0")
    .budget(FuzzBudget::time(Duration::from_secs(60)));
let result = run.execute()?;
let report = result.into_report();
# Ok::<(), Box<dyn std::error::Error>>(())

Requirements

cargo install cargo-fuzz

cargo-fuzz requires nightly Rust. The crate detects that and emits a clear FuzzError::NightlyRequired if it's missing.

Budget types

Budget Description
FuzzBudget::Time Run for the given duration.
FuzzBudget::Executions Run for the given number of executions.

Finding severities

Finding kind Severity
Crash Critical
OutOfMemory Error
Timeout Warning

Each finding's reproducer path is attached as Evidence::FileRef so consumers can replay the input.

The dev-* suite

See dev-tools for the full suite.

Status

v0.9.0 is the foundation release: API shape defined, subprocess integration lands in 0.9.1. Production use is discouraged until 1.0.

Minimum supported Rust version

1.85 for this crate; the user's fuzz targets require nightly Rust (driven by cargo-fuzz).

License

Apache-2.0. See LICENSE.