Lines Matching full:fuzz
17 The process of integrating a project written in Rust with OSS-Fuzz is very
22 ## cargo-fuzz support
24 Rust integration with OSS-Fuzz is expected to use [`cargo
25 fuzz`](https://github.com/rust-fuzz/cargo-fuzz) to build fuzzers. The `cargo
26 fuzz` tool will build code with required compiler flags as well as link to the
27 correct libFuzzer on OSS-Fuzz itself. Note that using `cargo fuzz` also makes it
32 First you'll want to follow the [setup instructions for `cargo fuzz`
33 itself](https://rust-fuzz.github.io/book/). Afterwards your project should have:
35 * A top-level `fuzz` directory.
36 * A `fuzz/Cargo.toml` manifest which pulls in necessary dependencies to fuzz.
37 * Some `fuzz/fuzz_targets/*.rs` files which are the fuzz targets that will be
38 compiled and run on OSS-Fuzz.
41 the scripts below to integrate into OSS-Fuzz.
53 [Example](https://github.com/google/oss-fuzz/blob/12ef3654b3e9adfd20b5a6afdde54819ba71493d/projects…
64 The Dockerfile should start by `FROM gcr.io/oss-fuzz-base/base-builder-rust`
66 The OSS-Fuzz builder image has the latest nightly release of Rust as well as
67 `cargo fuzz` pre-installed and in `PATH`. In the `Dockerfile` for your project
70 [Example](https://github.com/google/oss-fuzz/blob/12ef3654b3e9adfd20b5a6afdde54819ba71493d/projects…
78 Here it's expected that you'll build the fuzz targets for your project and then
80 [Example](https://github.com/google/oss-fuzz/blob/12ef3654b3e9adfd20b5a6afdde54819ba71493d/projects…
84 cargo fuzz build -O
85 cp fuzz/target/x86_64-unknown-linux-gnu/release/from_slice $OUT/
88 Note that you likely want to pass the `-O` flag to `cargo fuzz build` which
91 the `from_slice` binary is the fuzz target.
93 With some bash-fu you can also automatically copy over all fuzz targets into
94 the output directory so when you add a fuzz target to your project it's
95 automatically integrated into OSS-Fuzz:
99 for f in fuzz/fuzz_targets/*.rs
119 Cargo-fuzz automatically enables the `fuzzing` feature, which means you can
141 Finally, you can also combine the testing logic you have and the fuzz logic. This
148 seen [here](https://github.com/google/oss-fuzz/tree/master/projects/linkerd2-proxy).