build page in book

This commit is contained in:
Andrea Fioraldi 2021-03-27 10:10:50 +01:00
parent d231966dbe
commit cbfe17b95c
3 changed files with 34 additions and 1 deletions

View File

@ -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]).

View File

@ -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

View File

@ -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.