142 lines
5.5 KiB
TOML
142 lines
5.5 KiB
TOML
[package]
|
|
name = "libafl_bolts"
|
|
version.workspace = true
|
|
authors = ["Andrea Fioraldi <andreafioraldi@gmail.com>", "Dominik Maier <domenukk@gmail.com>"]
|
|
description = "Low-level bolts to create fuzzers and so much more"
|
|
documentation = "https://docs.rs/libafl"
|
|
repository = "https://github.com/AFLplusplus/LibAFL/"
|
|
readme = "./README.md"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["fuzzing", "testing", "security"]
|
|
edition = "2021"
|
|
categories = ["development-tools::testing", "emulators", "embedded", "os", "no-std"]
|
|
rust-version = "1.70.0"
|
|
|
|
[package.metadata.docs.rs]
|
|
features = ["document-features"]
|
|
all-features = true
|
|
|
|
[features]
|
|
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "rand_trait", "prelude", "gzip", "serdeany_autoreg", "alloc", "xxh3"]
|
|
document-features = ["dep:document-features"]
|
|
|
|
#! # Feature Flags
|
|
#! ### General Features
|
|
|
|
## Enables features that need rust's `std` lib to work, like print, env, ... support
|
|
std = ["serde_json", "serde_json/std", "hostname", "nix", "serde/std", "uuid", "backtrace", "uds", "serial_test", "alloc"]
|
|
|
|
## Enables all features that allocate in `no_std`
|
|
alloc = ["serde/alloc", "hashbrown", "postcard", "erased-serde/alloc", "ahash"]
|
|
|
|
## Provide the `#[derive(SerdeAny)]` macro.
|
|
derive = ["libafl_derive"]
|
|
|
|
## If set, libafl_bolt's `rand` implementations will implement `rand::Rng`
|
|
rand_trait = ["rand_core"]
|
|
|
|
## Will build the `pyo3` bindings
|
|
python = ["pyo3", "std"]
|
|
|
|
## Expose `libafl::prelude` for direct access to all types without additional `use` directives
|
|
prelude = []
|
|
|
|
## Expose `libafl_bolts::cli` for easy commandline parsing of common fuzzer settings
|
|
cli = ["clap"]
|
|
|
|
## Enables extra commandline flags for qemu-based fuzzers in `cli`
|
|
qemu_cli = ["cli"]
|
|
|
|
## Enables extra commandline flags for frida-based fuzzers in `cli`
|
|
frida_cli = ["cli"]
|
|
|
|
## Stores the backtraces of all generated `Error`s. Good for debugging, but may come with a slight performance hit.
|
|
errors_backtrace = ["backtrace"]
|
|
|
|
## Enables gzip compression in certain parts of the lib
|
|
gzip = ["miniz_oxide", "alloc"]
|
|
|
|
## Replaces `ahash` with the potentially faster [`xxh3`](https://github.com/Cyan4973/xxHash) in 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 in `no_std` no-alloc.
|
|
xxh3 = ["xxhash-rust"]
|
|
|
|
#! ### SerdeAny features
|
|
|
|
## Automatically register all `#[derive(SerdeAny)]` types at startup.
|
|
serdeany_autoreg = ["ctor"]
|
|
|
|
|
|
#! ### LLMP features
|
|
|
|
## If set, llmp will bind to 0.0.0.0, allowing cross-device communication. Binds to localhost by default.
|
|
llmp_bind_public = ["alloc"]
|
|
|
|
## Enables llmp compression using GZip
|
|
llmp_compression = ["alloc", "gzip"]
|
|
|
|
## Enables debug output for LLMP (also needs a `logger` installed)
|
|
llmp_debug = ["alloc"]
|
|
|
|
## Reduces the initial map size for llmp
|
|
llmp_small_maps = ["alloc"]
|
|
|
|
[build-dependencies]
|
|
rustversion = "1.0"
|
|
|
|
[dev-dependencies]
|
|
# clippy-suggested optimised byte counter
|
|
bytecount = "0.6.3"
|
|
|
|
[dependencies]
|
|
libafl_derive = { version = "0.11.1", optional = true, path = "../libafl_derive" }
|
|
|
|
rustversion = "1.0"
|
|
tuple_list = { version = "0.1.3" }
|
|
hashbrown = { version = "0.14", features = ["serde", "ahash"], default-features=false, optional = true } # A faster hashmap, nostd compatible
|
|
xxhash-rust = { version = "0.8.5", features = ["xxh3"], optional = true } # xxh3 hashing for rust
|
|
serde = { version = "1.0", default-features = false, features = ["derive"] } # serialization lib
|
|
erased-serde = { version = "0.3.21", default-features = false, optional = true } # erased serde
|
|
postcard = { version = "1.0", features = ["alloc"], default-features = false, optional = true } # no_std compatible serde serialization format
|
|
num_enum = { version = "0.6", default-features = false }
|
|
ahash = { version = "0.8", default-features=false, optional = true } # The hash function already used in hashbrown
|
|
backtrace = {version = "0.3", optional = true} # Used to get the stacktrace in StacktraceObserver
|
|
|
|
ctor = { optional = true, version = "0.2" }
|
|
serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
|
|
miniz_oxide = { version = "0.7.1", optional = true}
|
|
hostname = { version = "^0.3", optional = true } # Is there really no gethostname in the stdlib?
|
|
rand_core = { version = "0.6", optional = true }
|
|
nix = { version = "0.26", optional = true }
|
|
uuid = { version = "1.4", optional = true, features = ["serde", "v4"] }
|
|
clap = {version = "4.0", features = ["derive", "wrap_help"], optional = true} # CLI parsing, for libafl_bolts::cli / the `cli` feature
|
|
log = "0.4.20"
|
|
|
|
pyo3 = { version = "0.18.3", optional = true, features = ["serde", "macros"] }
|
|
|
|
# optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable)
|
|
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", optional = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2" # For (*nix) libc
|
|
uds = { version = "0.4", optional = true, default-features = false }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows = { version = "0.51.1", features = ["Win32_Foundation", "Win32_System_Threading", "Win32_System_Diagnostics_Debug", "Win32_System_Kernel", "Win32_System_Memory", "Win32_Security", "Win32_System_SystemInformation"] }
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
windows = "0.51.1"
|
|
|
|
#[profile.release]
|
|
#lto = true
|
|
#opt-level = 3
|
|
#debug = true
|
|
|
|
[[example]]
|
|
name = "llmp_test"
|
|
path = "./examples/llmp_test/main.rs"
|
|
required-features = ["std"]
|