diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 4f11a3b..34b4ab0 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -12,4 +12,5 @@ * [Fuzzing with afl.rs](./afl.md) * [Setup](./afl/setup.md) * [Tutorial](./afl/tutorial.md) + * [Installing from source](./afl/installing-from-source.md) * [Trophy case](./trophy-case.md) diff --git a/src/afl/installing-from-source.md b/src/afl/installing-from-source.md new file mode 100644 index 0000000..05c67e5 --- /dev/null +++ b/src/afl/installing-from-source.md @@ -0,0 +1,34 @@ +# Installing from source + +First, clone afl.rs: + +```sh +git clone https://github.com/rust-fuzz/afl.rs +cd afl.rs +``` + +Next, checkout afl.rs's submodule ([AFL++]). Note that `--recursive` is not required. + +```sh +git submodule update --init +``` + +Finally, install `cargo-afl`: + +```sh +cargo install --path cargo-afl +``` + +## Troubleshooting + +If `cargo-afl` is panicking, consider installing with `--debug` and running `cargo-afl` with `RUST_BACKTRACE=1`, e.g.: + +```sh +cargo install --path cargo-afl --debug +... +RUST_BACKTRACE=1 cargo afl ... +``` + +Adding `--debug` to the `cargo install` command causes `cargo-afl` to produce more elaborate backtraces. + +[AFL++]: https://github.com/AFLplusplus/AFLplusplus \ No newline at end of file diff --git a/src/afl/setup.md b/src/afl/setup.md index bd39021..e9315f7 100644 --- a/src/afl/setup.md +++ b/src/afl/setup.md @@ -4,8 +4,8 @@ ### Tools -* C compiler (e.g. gcc or clang) -* make +- C compiler (e.g. gcc or clang) +- make ### Platform @@ -15,8 +15,12 @@ afl.rs works on x86-64 Linux, x86-64 macOS, and ARM64 macOS. cargo install cargo-afl ``` +Alternatively, `cargo-afl` can be [installed from source]. + ## Upgrading ```sh cargo install --force cargo-afl ``` + +[installed from source]: installing-from-source.md