From cbfe17b95c97f9d300add3dcfa7f80c4b098d6ae Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Sat, 27 Mar 2021 10:10:50 +0100 Subject: [PATCH] build page in book --- docs/src/getting_started/build.md | 21 +++++++++++++++++++++ docs/src/getting_started/crates.md | 12 ++++++++++++ docs/src/getting_started/getting_started.md | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/src/getting_started/build.md b/docs/src/getting_started/build.md index 174deb9738..7aad411b76 100644 --- a/docs/src/getting_started/build.md +++ b/docs/src/getting_started/build.md @@ -1,3 +1,24 @@ # Build +LibAFL, as most of the Rust projects, can be built using `cargo` from the root directory of the project with: +```sh +$ cargo build --release +``` + +Note that the `--release` flag is optional for development, but it is needed for fuzzing at a decent speed, +otherwise you will experience a slowdown of even more than 10x. + +The LibAFL repository is composed by multiple crates, and the top-level Cargo.toml is just an orchestrator that groups these crates +in a workspace. Building from the root directory will build all the crates in the workspace. + +## Build example fuzzers + +You can notice that in the repository there is a `fuzzers/` folder. +This folder contains a set of crates that are not part of the workspace, so that are not built issuing `cargo build` from the top-level directory. + +These crates are examples of fuzzers using particular features of LibAFL combined sometimes with instrumentation backends (e.g. [SanitizerCoverage](https://clang.llvm.org/docs/SanitizerCoverage.html), [Frida](https://frida.re/), ...). + +The user can use these crates as examples and as skeleton for its custom fuzzer using a similar set of features. + +To build an example fuzzer you have to invoke cargo from its folder (`fuzzers/[FUZZER_NAME]). diff --git a/docs/src/getting_started/crates.md b/docs/src/getting_started/crates.md index 5008dca83a..c6b907532e 100644 --- a/docs/src/getting_started/crates.md +++ b/docs/src/getting_started/crates.md @@ -1 +1,13 @@ # Crates + +LibAFL is composed by different crates. +Each one has its self-contained purpose, and the user may not need to use all of them in its project. + +Following the naming convention of the folders in the project's root, they are: + +- libafl +- libafl_derive +- libafl_targets +- libafl_cc + + diff --git a/docs/src/getting_started/getting_started.md b/docs/src/getting_started/getting_started.md index 6becb923c8..ef05e80138 100644 --- a/docs/src/getting_started/getting_started.md +++ b/docs/src/getting_started/getting_started.md @@ -1,4 +1,4 @@ # Getting Started To start using LibAFL, there are some first steps to do. In this chapter, we will -discuss how to install LibAFL with `cargo`, how are structured its crates and the purpose of each crate. +discuss how to download LibAFL and build with `cargo`, how are structured its crates and the purpose of each crate.