Introduce document-features feature (#1477)

This commit is contained in:
Dominik Maier 2023-08-29 12:40:35 +02:00 committed by GitHub
parent e66eb33e96
commit 7d2c854b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 13 deletions

View File

@ -17,6 +17,7 @@ all-features = true
[features] [features]
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "llmp_broker_timeouts", "rand_trait", "fork", "prelude", "gzip", "regex", "serdeany_autoreg", "tui_monitor"] 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 #! # Feature Flags
#! ### General Features #! ### General Features
@ -117,7 +118,7 @@ llmp_small_maps = ["libafl_bolts/llmp_small_maps"] # reduces initial map size fo
#! ## License-Changing Dependencies(!) #! ## License-Changing Dependencies(!)
## Enables features hiding dependencies licensed under `AGPL` ## Enables all features hiding dependencies licensed under `AGPL`
agpl = ["nautilus"] agpl = ["nautilus"]
## Enables the [`Nautilus`](https://wcventure.github.io/FuzzingPaper/Paper/NDSS19_Nautilus.pdf) Grammar Mutator (AGPL-licensed) ## 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"] } serial_test = { version = "2", optional = true, default-features = false, features = ["logging"] }
# Document all features of this crate (for `cargo doc`) # Document all features of this crate (for `cargo doc`)
document-features = { version = "0.2" } document-features = { version = "0.2", optional = true }
# AGPL # AGPL
# !!! this create requires nightly # !!! this create requires nightly

View File

@ -3,7 +3,7 @@ Welcome to `LibAFL`
*/ */
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
/*! */ /*! */
#![doc = document_features::document_features!()] #![cfg_attr(feature = "document-features", doc = document_features::document_features!())]
#![allow(incomplete_features)] #![allow(incomplete_features)]
#![no_std] #![no_std]
// For `type_eq` // For `type_eq`

View File

@ -18,6 +18,7 @@ all-features = true
[features] [features]
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "rand_trait", "prelude", "gzip", "serdeany_autoreg", "alloc"] default = ["std", "derive", "llmp_compression", "llmp_small_maps", "rand_trait", "prelude", "gzip", "serdeany_autoreg", "alloc"]
document-features = ["dep:document-features"]
#! # Feature Flags #! # Feature Flags
#! ### General Features #! ### 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"] } serial_test = { version = "2", optional = true, default-features = false, features = ["logging"] }
# Document all features of this crate (for `cargo doc`) # 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] [target.'cfg(unix)'.dependencies]
libc = "0.2" # For (*nix) libc libc = "0.2" # For (*nix) libc

View File

@ -3,7 +3,7 @@
*/ */
#![doc = include_str!("../README.md")] #![doc = include_str!("../README.md")]
/*! */ /*! */
#![doc = document_features::document_features!()] #![cfg_attr(feature = "document-features", doc = document_features::document_features!())]
#![allow(incomplete_features)] #![allow(incomplete_features)]
#![no_std] #![no_std]
// For `type_eq` // For `type_eq`

View File

@ -18,8 +18,10 @@ all-features = true
[features] [features]
default = ["build", "clone"] default = ["build", "clone"]
build = ["which", "cmake"] # common functionality to build symcc ## common functionality to build symcc
clone = ["which"] # common functionality to check out the symcc repo using git build = ["which", "cmake"]
## common functionality to check out the symcc repo using git
clone = ["which"]
[dependencies] [dependencies]
which = { version = "4.4", optional = true } which = { version = "4.4", optional = true }

View File

@ -18,7 +18,7 @@ categories = ["development-tools::testing", "emulators", "embedded", "os", "no-s
all-features = true all-features = true
[features] [features]
# skips building and linking the C++ part of the runtime ## skips building and linking the C++ part of the runtime
no-cpp-runtime = [] no-cpp-runtime = []
[dependencies] [dependencies]

View File

@ -25,16 +25,16 @@ rustversion = "1.0"
[features] [features]
#! ## Feature Flags #! ## 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"] arbitrary-derive = ["libfuzzer-sys/arbitrary-derive"]
## enables fuzzer introspection with LibAFL's `introspection` feature ## Enables fuzzer introspection with LibAFL's `introspection` feature
introspection = [] introspection = []
[dependencies] [dependencies]
libfuzzer-sys = { version = "0.4.7", default-features = false } libfuzzer-sys = { version = "0.4.7", default-features = false }
document-features = { version = "0.2", optional = true }
document-features = { version = "0.2" }
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true

View File

@ -8,7 +8,8 @@ publish = false
[features] [features]
default = ["fork", "serdeany_autoreg"] 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 serdeany_autoreg = [] # TODO: drop this when fixed in libafl proper