Cargo Features
[dependencies]
libafl_bolts = { version = "0.15.4", default-features = false, features = ["document-features", "std", "alloc", "derive", "rand_trait", "python", "prelude", "cli", "qemu_cli", "frida_cli", "errors_backtrace", "gzip", "xxh3", "stable_anymap", "serdeany_autoreg", "llmp_bind_public", "llmp_compression", "llmp_debug", "llmp_small_maps", "simd"] }
- default = alloc, derive, gzip, llmp_compression, llmp_small_maps, rand_trait, serdeany_autoreg, std, xxh3
-
These default features are set whenever
libafl_boltsis added withoutsomewhere in the dependency tree.default-features = false - document-features
-
Enables document-features
Document all features of this crate (for
cargo doc) - std default llmp_debug? python? = alloc, backtrace, hostname, nix, serial_test, simd, uds, uuid
-
Feature Flags
General Features
Enables features that need rust's
stdlib to work, like print, env, ... supportserialization lib
Affects
libafl_bolts::build_id,libafl_bolts::core_affinity,libafl_bolts::fs,libafl_bolts::minibsod,libafl_bolts::staterestore,libafl_bolts::argparse,libafl_bolts::target_args,libafl_bolts::current_time,libafl_bolts::LIBAFL_STDERR_LOGGER,libafl_bolts::LIBAFL_STDOUT_LOGGER,libafl_bolts::SimpleStdoutLogger,libafl_bolts::get_thread_id,libafl_bolts::get_thread_id,libafl_bolts::SimpleStderrLogger,libafl_bolts::SimpleFdLogger,libafl_bolts::set_error_print_panic_hook,llmp::Listener,llmp::ListenerStream,llmp::send_tcp_msg,llmp::recv_tcp_msg… - alloc default gzip llmp_bind_public? llmp_compression llmp_debug? llmp_small_maps simd? std = ahash, hashbrown, postcard
-
Enables all features that allocate in
no_stdEnables alloc of erased-serde and serde
erased-serde:
erased serde
Affects
libafl_bolts::anymap,libafl_bolts::llmp,libafl_bolts::ownedref,libafl_bolts::serdeany,libafl_bolts::subrange,libafl_bolts::Named,libafl_bolts::format_duration,libafl_bolts::format_big_number,libafl_bolts::vec_init,os::pipes,unix_signals::SignalHandler,unix_signals::setup_signal_handler,windows_exceptions::ExceptionHandler,windows_exceptions::setup_exception_handler,rands::loaded_dice,shmem::NopShMemProvider,shmem::NopShMem,shmem::RcShMem,simd::covmap_is_interesting_naive,tuples::IntoVec… - derive default = libafl_derive
-
Provide the
#[derive(SerdeAny)]macro. - rand_trait default = rand_core
-
If set, libafl_bolt's
randimplementations will implementrand_core::CoreRngand, inversely, all seedablerand_core::RngCoretypes can be used as Rng for LibAFL. - python = pyo3, std
-
Will build the
pyo3bindingsAffects
libafl_bolts::pybind,rands::pybind… - prelude
-
Expose
libafl::preludefor direct access to all types without additionalusedirectivesAffects
libafl_bolts::bolts_prelude,libafl_bolts::prelude… - cli frida_cli? qemu_cli? = clap
-
Expose
libafl_bolts::clifor easy commandline parsing of common fuzzer settings - qemu_cli = cli
-
Enables extra commandline flags for qemu-based fuzzers in
cliAffects
cli::FuzzerOptions.qemu_args,libafl_bolts::cli… - frida_cli = cli
-
Enables extra commandline flags for frida-based fuzzers in
cliAffects
cli::FridaScriptBackend,cli::FuzzerOptions.asan_cores,cli::FuzzerOptions.harness_function,cli::FuzzerOptions.libs_to_instrument,cli::FuzzerOptions.cmplog_cores,cli::FuzzerOptions.detect_leaks,cli::FuzzerOptions.continue_on_error,cli::FuzzerOptions.allocation_backtraces,cli::FuzzerOptions.max_allocation,cli::FuzzerOptions.max_total_allocation,cli::FuzzerOptions.max_allocation_panics,cli::FuzzerOptions.disable_coverage,cli::FuzzerOptions.drcov,cli::FuzzerOptions.disable_excludes,cli::FuzzerOptions.dont_instrument,cli::FuzzerOptions.backend,libafl_bolts::cli… - errors_backtrace = backtrace
-
Stores the backtraces of all generated
Errors. Good for debugging, but may come with a slight performance hit.Affects
libafl_bolts::ErrorBacktrace… - gzip default llmp_compression = alloc, miniz_oxide
-
Enables gzip compression in certain parts of the lib
Affects
libafl_bolts::compress… - xxh3 default = xxhash-rust
-
Replaces
ahashwith the potentially fasterxxh3in some parts of the lib. This yields a stable and fast hash, but may increase the resulting binary size slightly This also enables certain hashing and rand features inno_stdno-alloc.Affects
libafl_bolts::tuples,libafl_bolts::hasher_std,libafl_bolts::hash_std,libafl_bolts::generic_hash_std… - stable_anymap
-
SerdeAny features
With this feature, the AnyMap uses
type_nameinstead ofTypeId::offor deserialization. With this feature, stored state remains deserializable across multiple compilations of LibAFL. The rust doc specifically states that "multiple types may map to the same type name", so it could potentially lead to bugs. However, we make sure that no two types with the same name ever exist.Affects
serdeany::TypeRepr… - serdeany_autoreg default = ctor
-
Automatically register all
#[derive(SerdeAny)]types at startup. - llmp_bind_public = alloc
-
LLMP features
If set, llmp will bind to 0.0.0.0, allowing cross-device communication. Binds to localhost by default.
- llmp_compression default = alloc, gzip
-
Enables llmp compression using GZip
- llmp_debug = alloc, std
-
Enables debug output for LLMP (also needs a
loggerinstalled) - llmp_small_maps default = alloc
-
Reduces the initial map size for llmp
- simd std = alloc, wide
-
Stable SIMD features
Use the best SIMD implementation by our benchmark.
Features from optional dependencies
In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- libafl_derive derive
- hashbrown alloc
-
Enables hashbrown
A faster hashmap, nostd compatible
- xxhash-rust xxh3
-
Enables xxhash-rust
xxh3 hashing for rust
- erased-serde alloc
- postcard alloc
-
Enables postcard
no_std compatible serde serialization format
- ahash alloc
-
Enables ahash
The hash function already used in hashbrown
- backtrace errors_backtrace? std
-
Enables backtrace
Used to get the stacktrace in StacktraceObserver
- ctor serdeany_autoreg
- miniz_oxide gzip
-
Enables miniz_oxide ^0.8.0
- hostname std
-
Enables hostname
Is there really no gethostname in the stdlib?
- rand_core rand_trait
-
Enables rand_core ^0.9.0
- nix std
-
Enables nix ^0.30.1
- uuid std
- clap cli?
-
Enables clap
CLI parsing, for libafl_bolts::cli / the
clifeature - pyo3 python?
-
Enables pyo3 ^0.26.0
- serial_test std
-
Enables serial_test
optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable)
- wide simd?
-
Enables wide ^0.7.33
optional stable simd
Affects
simd::vector,simd::SimdReducer,simd::SimdMaxReducer,simd::SimdMinReducer,simd::SimdOrReducer,simd::SimdAndReducer,simd::VectorType,simd::simplify_map_simd,simd::covmap_is_interesting_simd… - uds unix std