cargo-fuzz
cargo-fuzz is the de facto fuzzing tool for Rust projects using Cargo. Use for fuzzing Rust code with libFuzzer backend.
npx skills add trailofbits/skills --skill cargo-fuzz --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# cargo-fuzz cargo-fuzz is the de facto choice for fuzzing Rust projects when using Cargo. It uses libFuzzer as the backend and provides a convenient Cargo subcommand that automatically enables relevant compilation flags for your Rust project, including support for sanitizers like AddressSanitizer. ## When to Use cargo-fuzz is currently the primary and most mature fuzzing solution for Rust projects using Cargo. | Fuzzer | Best For | Complexity | |--------|----------|------------| | cargo-fuzz | Cargo-based Rust projects, quick setup | Low | | AFL++ | Multi-core fuzzing, non-Cargo projects | Medium | | LibAFL | Custom fuzzers, research, advanced use cases | High | **Choose cargo-fuzz when:** - Your project uses Cargo (required) - You want simple, quick setup with minimal configuration - You need integrated sanitizer support - You're fuzzing Rust code with or without unsafe blocks ## Quick Start ```rust #![no_main] use libfuzzer_sys::fuzz_target; fn harness(data: &[u8]) { your_project::check_buf(data); } fuzz_target!(|data: &[u8]| { harness(data); }); ``` Initialize and run: ```bash cargo fuzz init # Edit fuzz/fuzz_targets/fuzz_target_1.rs with your harness cargo +nightly fuzz run fu
- When to Use
- Quick Start
- Installation
- Prerequisites
- Linux/macOS
- Verification
- Writing a Harness
- Project Structure
- Harness Structure
- Harness Rules
- Structure-Aware Fuzzing
- Running Campaigns
- Basic Run
- Without Sanitizers (Safe Rust)
cargo fuzz init Edit fuzz/fuzz_targets/fuzz_target_1.rs with your harness cargo +nightly fuzz run fuzz_target_1 Install nightly toolchain rustup install nightly Install cargo-fuzz cargo install cargo-fuzz cargo +nightly --version cargo fuzz --version cargo +nightly fuzz run --sanitizer none fuzz_target_1
What does the cargo-fuzz skill do?
cargo-fuzz is the de facto fuzzing tool for Rust projects using Cargo. Use for fuzzing Rust code with libFuzzer backend.
How do I install it?
Run `npx skills add trailofbits/skills --skill cargo-fuzz --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
