diff --git a/libafl/Cargo.toml b/libafl/Cargo.toml index cf2e4c5d08..8ffef80dd7 100644 --- a/libafl/Cargo.toml +++ b/libafl/Cargo.toml @@ -17,6 +17,7 @@ all-features = true [features] default = ["std", "derive", "llmp_compression", "llmp_small_maps", "llmp_broker_timeouts", "rand_trait", "fork", "prelude", "gzip", "regex", "serdeany_autoreg", "tui_monitor"] +document-features = ["dep:document-features"] #! # Feature Flags #! ### General Features @@ -117,7 +118,7 @@ llmp_small_maps = ["libafl_bolts/llmp_small_maps"] # reduces initial map size fo #! ## License-Changing Dependencies(!) -## Enables features hiding dependencies licensed under `AGPL` +## Enables all features hiding dependencies licensed under `AGPL` agpl = ["nautilus"] ## Enables the [`Nautilus`](https://wcventure.github.io/FuzzingPaper/Paper/NDSS19_Nautilus.pdf) Grammar Mutator (AGPL-licensed) @@ -176,7 +177,7 @@ libcasr = { version = "2.7", optional = true} serial_test = { version = "2", optional = true, default-features = false, features = ["logging"] } # Document all features of this crate (for `cargo doc`) -document-features = { version = "0.2" } +document-features = { version = "0.2", optional = true } # AGPL # !!! this create requires nightly diff --git a/libafl/src/lib.rs b/libafl/src/lib.rs index f688b2c33a..afada3902d 100644 --- a/libafl/src/lib.rs +++ b/libafl/src/lib.rs @@ -3,7 +3,7 @@ Welcome to `LibAFL` */ #![doc = include_str!("../README.md")] /*! */ -#![doc = document_features::document_features!()] +#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] #![allow(incomplete_features)] #![no_std] // For `type_eq` diff --git a/libafl_bolts/Cargo.toml b/libafl_bolts/Cargo.toml index 7c92f3c3c0..0c763eb42d 100644 --- a/libafl_bolts/Cargo.toml +++ b/libafl_bolts/Cargo.toml @@ -18,6 +18,7 @@ all-features = true [features] default = ["std", "derive", "llmp_compression", "llmp_small_maps", "rand_trait", "prelude", "gzip", "serdeany_autoreg", "alloc"] +document-features = ["dep:document-features"] #! # Feature Flags #! ### General Features @@ -112,7 +113,7 @@ pyo3 = { version = "0.18.3", optional = true, features = ["serde", "macros"] } serial_test = { version = "2", optional = true, default-features = false, features = ["logging"] } # Document all features of this crate (for `cargo doc`) -document-features = { version = "0.2" } +document-features = { version = "0.2", optional = true } [target.'cfg(unix)'.dependencies] libc = "0.2" # For (*nix) libc diff --git a/libafl_bolts/src/lib.rs b/libafl_bolts/src/lib.rs index f6b9dc2ce2..f553335a0f 100644 --- a/libafl_bolts/src/lib.rs +++ b/libafl_bolts/src/lib.rs @@ -3,7 +3,7 @@ */ #![doc = include_str!("../README.md")] /*! */ -#![doc = document_features::document_features!()] +#![cfg_attr(feature = "document-features", doc = document_features::document_features!())] #![allow(incomplete_features)] #![no_std] // For `type_eq` diff --git a/libafl_concolic/symcc_libafl/Cargo.toml b/libafl_concolic/symcc_libafl/Cargo.toml index cc0d6e3dc1..35b5fb5234 100644 --- a/libafl_concolic/symcc_libafl/Cargo.toml +++ b/libafl_concolic/symcc_libafl/Cargo.toml @@ -18,8 +18,10 @@ all-features = true [features] default = ["build", "clone"] -build = ["which", "cmake"] # common functionality to build symcc -clone = ["which"] # common functionality to check out the symcc repo using git +## common functionality to build symcc +build = ["which", "cmake"] +## common functionality to check out the symcc repo using git +clone = ["which"] [dependencies] which = { version = "4.4", optional = true } diff --git a/libafl_concolic/symcc_runtime/Cargo.toml b/libafl_concolic/symcc_runtime/Cargo.toml index ccc1b791c1..9a297ebf96 100644 --- a/libafl_concolic/symcc_runtime/Cargo.toml +++ b/libafl_concolic/symcc_runtime/Cargo.toml @@ -18,7 +18,7 @@ categories = ["development-tools::testing", "emulators", "embedded", "os", "no-s all-features = true [features] -# skips building and linking the C++ part of the runtime +## skips building and linking the C++ part of the runtime no-cpp-runtime = [] [dependencies] diff --git a/libafl_libfuzzer/Cargo.toml b/libafl_libfuzzer/Cargo.toml index 969d66f883..c874b91a70 100644 --- a/libafl_libfuzzer/Cargo.toml +++ b/libafl_libfuzzer/Cargo.toml @@ -25,16 +25,16 @@ rustversion = "1.0" [features] #! ## Feature Flags +document-features = ["dep:document-features"] -## enables the derive macros for the arbitrary dependency, transparently forwarded from libfuzzer-sys +## Enables the derive macros for the arbitrary dependency, transparently forwarded from libfuzzer-sys arbitrary-derive = ["libfuzzer-sys/arbitrary-derive"] -## enables fuzzer introspection with LibAFL's `introspection` feature +## Enables fuzzer introspection with LibAFL's `introspection` feature introspection = [] [dependencies] libfuzzer-sys = { version = "0.4.7", default-features = false } - -document-features = { version = "0.2" } +document-features = { version = "0.2", optional = true } [package.metadata.docs.rs] all-features = true diff --git a/libafl_libfuzzer/libafl_libfuzzer_runtime/Cargo.toml b/libafl_libfuzzer/libafl_libfuzzer_runtime/Cargo.toml index eea5ac5612..49f6b576e5 100644 --- a/libafl_libfuzzer/libafl_libfuzzer_runtime/Cargo.toml +++ b/libafl_libfuzzer/libafl_libfuzzer_runtime/Cargo.toml @@ -8,7 +8,8 @@ publish = false [features] default = ["fork", "serdeany_autoreg"] -fork = ["libafl/fork"] # Enables forking mode for the LibAFL launcher (instead of starting new processes) +## Enables forking mode for the LibAFL launcher (instead of starting new processes) +fork = ["libafl/fork"] serdeany_autoreg = [] # TODO: drop this when fixed in libafl proper