Skip to content

Commit

Permalink
Fix libafl_sugar docs build (AFLplusplus#2188)
Browse files Browse the repository at this point in the history
* Fix libafl_sugar docs build

* doc redoc

* fmt
  • Loading branch information
domenukk authored May 15, 2024
1 parent c7303ac commit 34ec907
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
39 changes: 28 additions & 11 deletions libafl_sugar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,33 @@ categories = ["development-tools::testing", "emulators", "embedded", "os", "no-s
all-features = true

[features]
python = ["pyo3", "libafl_qemu/python", "pyo3-build-config"]
default = []
document-features = ["dep:document-features"]
clippy = [ "libafl_qemu/clippy" ] # special feature for clippy, don't use in normal projects

#! # Feature Flags
#! ## General Features

## Build python bindings
python = ["pyo3", "libafl_qemu/python", "pyo3-build-config"]

# for libafl_qemu
# The following architecture features are mutually exclusive.
x86_64 = ["libafl_qemu/x86_64"] # build qemu for x86_64 (default)
i386 = ["libafl_qemu/i386"] # build qemu for i386
arm = ["libafl_qemu/arm"] # build qemu for arm
aarch64 = ["libafl_qemu/aarch64"] # build qemu for aarch64
mips = ["libafl_qemu/mips"] # build qemu for mips (el, use with the 'be' feature of mips be)
ppc = ["libafl_qemu/ppc"] # build qemu for powerpc
hexagon = ["libafl_qemu/hexagon"] # build qemu for hexagon
#! ## Features for `libafl_qemu` (Linux only)
#! The following architecture features are mutually exclusive.

## build qemu for x86_64 (default)
x86_64 = ["libafl_qemu/x86_64"]
## build qemu for i386
i386 = ["libafl_qemu/i386"]
## build qemu for arm
arm = ["libafl_qemu/arm"]
## build qemu for aarch64
aarch64 = ["libafl_qemu/aarch64"]
## build qemu for mips (el, use with the 'be' feature of mips be)
mips = ["libafl_qemu/mips"]
## build qemu for powerpc
ppc = ["libafl_qemu/ppc"]
## build qemu for hexagon
hexagon = ["libafl_qemu/hexagon"]

[build-dependencies]
pyo3-build-config = { version = "0.18", optional = true }
Expand All @@ -37,6 +52,9 @@ libafl = { path = "../libafl", version = "0.12.0", features = ["adaptive_seriali
libafl_bolts = { path = "../libafl_bolts", version = "0.12.0" }
libafl_targets = { path = "../libafl_targets", version = "0.12.0" }

# Document all features of this crate (for `cargo doc`)
document-features = { version = "0.2", optional = true }

typed-builder = "0.18" # Implement the builder pattern at compiletime
pyo3 = { version = "0.18", optional = true }
log = "0.4.20"
Expand All @@ -47,4 +65,3 @@ libafl_qemu = { path = "../libafl_qemu", version = "0.12.0" }
[lib]
name = "libafl_sugar"
crate-type = ["cdylib", "rlib"]

5 changes: 3 additions & 2 deletions libafl_sugar/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Sugar API to simplify the life of the naive user of `LibAFL`
//! Sugar API to simplify the life of users of `LibAFL` that just want to fuzz.
/*! */
#![cfg_attr(feature = "document-features", doc = document_features::document_features!())]
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(clippy::all)]
#![deny(clippy::pedantic)]
Expand Down

0 comments on commit 34ec907

Please sign in to comment.