Skip to content

Commit

Permalink
Improve example
Browse files Browse the repository at this point in the history
  • Loading branch information
louismerlin committed Mar 8, 2024
1 parent 1a0d705 commit 857ec6a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,24 @@ Options:
-V, --version Print version
```

To use it in your own project, simply add `ziggy` as a dependency.
To create a fuzzer, simply add `ziggy` as a dependency.

```toml
[dependencies]
ziggy = { version = "1.0.0", default-features = false }
```
Then, use the `fuzz!` macro inside your harness.

Then use the `fuzz!` macro inside your `main` to create a harness.

```rust
ziggy::fuzz!(|data: &[u8]| {
if let Ok(string) = std::str::from_utf8(data) {
fuzzme(string);
}
});
fn main() {
ziggy::fuzz!(|data: &[u8]| {
println!("{data:?}");
});
}
```
For an example fuzz project, see [the url example](./examples/url/).

For a well-documented fuzzer, see [the url example](./examples/url/).

## The `output` directory

Expand Down

0 comments on commit 857ec6a

Please sign in to comment.