Skip to main content

Crate dev_fuzz

Crate dev_fuzz 

Source
Expand description

§dev-fuzz

Fuzzing harness integration for Rust. Wraps cargo-fuzz (libFuzzer-based) and emits findings as dev_report::Report.

Captures crashes, timeouts, and OOM events with reproducer inputs attached as Evidence::FileRef so consumers can replay the input that triggered each finding.

§Quick example

use dev_fuzz::{FuzzBudget, FuzzRun};
use std::time::Duration;

let run = FuzzRun::new("parse_input", "0.1.0")
    .budget(FuzzBudget::time(Duration::from_secs(60)));
let result = run.execute().unwrap();
let report = result.into_report();

§Requirements

cargo install cargo-fuzz
rustup toolchain install nightly      # libFuzzer requires nightly

The crate detects absence of either prerequisite and surfaces FuzzError::ToolNotInstalled / FuzzError::NightlyRequired without panicking.

Structs§

FuzzFinding
A single fuzz finding.
FuzzProducer
Producer adapter that drives a FuzzRun and converts the result into a Report.
FuzzResult
Result of a fuzz run.
FuzzRun
Configuration for a fuzz run.

Enums§

FuzzBudget
Budget for a fuzz run.
FuzzError
Errors that can arise during a fuzz run.
FuzzFindingKind
Type of finding discovered during a fuzz run.
Sanitizer
Which sanitizer to enable on the fuzz target build.