Dominik Maier dfaf06a22e
Make bolts work without alloc (#1401)
* Make bolts work without alloc

* Use core::Error where available

* unstable_feature -> nightly

* windows no_alloc
2023-08-05 01:03:40 +02:00

94 lines
4.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"]
[features]
default = ["std", "derive", "llmp_compression", "llmp_small_maps", "rand_trait", "prelude", "gzip", "serdeany_autoreg", "alloc"]
std = ["serde_json", "serde_json/std", "hostname", "nix", "serde/std", "once_cell", "uuid", "byteorder", "backtrace", "uds", "serial_test", "alloc"] # print, env, ... support
alloc = ["serde/alloc", "hashbrown", "postcard", "erased-serde/alloc", "ahash"] # Enables all features that allocate in no_std
derive = ["libafl_derive"] # provide derive(SerdeAny) macro.
rand_trait = ["rand_core"] # If set, libafl's rand implementations will implement `rand::Rng`
python = ["pyo3", "std"]
prelude = [] # Expose libafl::prelude for access without additional using directives
cli = ["clap"] # expose libafl_bolts::cli for easy commandline parsing
qemu_cli = ["cli"] # Commandline flagr for qemu-based fuzzers
frida_cli = ["cli"] # Commandline flags for frida-based fuzzers
errors_backtrace = ["backtrace"]
gzip = ["miniz_oxide"] # Enables gzip compression in certain parts of the lib
# SerdeAny features
serdeany_autoreg = ["ctor"] # Automatically register all `#[derive(SerdeAny)]` types at startup.
# LLMP features
llmp_bind_public = ["alloc"] # If set, llmp will bind to 0.0.0.0, allowing cross-device communication. Binds to localhost by default.
llmp_compression = ["alloc", "gzip"] # llmp compression using GZip
llmp_debug = ["alloc"] # Enables debug output for LLMP
llmp_small_maps = ["alloc"] # reduces initial map size for llmp
[build-dependencies]
rustversion = "1.0"
[dev-dependencies]
# clippy-suggested optimised byte counter
bytecount = "0.6.3"
[dependencies]
libafl_derive = { version = "0.10.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"] } # 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"], optional = true } # no_std compatible serde serialization format
num_enum = { version = "0.5.7", 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.1.2", optional = true, features = ["serde", "v4"] }
byteorder = { version = "1.4", optional = true }
once_cell = { version = "1.13", optional = true }
clap = {version = "4.0", features = ["derive", "wrap_help"], optional = true} # CLI parsing, for libafl_bolts::cli / the `cli` feature
log = "0.4.18"
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 }
[target.'cfg(unix)'.dependencies]
libc = "0.2" # For (*nix) libc
uds = { version = "0.2.6", optional = true }
[target.'cfg(windows)'.dependencies]
windows = { version = "0.44", 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.44"
#[profile.release]
#lto = true
#opt-level = 3
#debug = true
[[example]]
name = "llmp_test"
path = "./examples/llmp_test/main.rs"
required-features = ["std"]