Rust replacement for miniz
$ ./build.sh
$ ./test.sh
Even thought miniz_oxide uses cargo internally, it is not a crate and should be used as if it is a foreign library. To build a crate with miniz_oxide you need to follow those steps:
- Write extern block with miniz functions with attribute
#[link(name = "miniz_oxide")]
- Run build.sh from build.rs of your project and add
links = "miniz_oxide"
to[package]
Link against the libminiz_oxide.a generated by build.sh
To run American Fuzzy Lop you need to start docker:
$ docker run -v $(pwd):/source -it corey/afl.rs bash
And from there build miniz_oxide with afl_test feature:
$ cargo build --release --features="afl_test"
Finally, run the afl:
afl-fuzz -i in -o out target/release/miniz_oxide