Dominik Maier 684b31279e
Add BytesSubInput to mutate sub-parts of a bytes-backed input (#2220)
* Add BytesSubMutator that allows us to mutate sub-parts of a bytes-backed input

* no_std

* fix string mutator

* make build

* Fix clippy on macOS

* Docs

* More docs

* Better docs

* --amend

* Renamed bsi to sub_input. Too much BSI

* More more

* balance backticks

* Make splicing usable with sub_input (not that it makes sense)

* More annotations

* more input annotations?

* Implement HasMutatorBytes for &mut Vec

* clippy

* Use a wrapper type instead

* Add wrapper type for Vec as well

* Remove the duplicate BytesInput... lol
2024-05-22 01:50:07 +02:00

26 lines
607 B
Rust

mod host_specific {
#[cfg(target_os = "linux")]
include!("build_linux.rs");
#[cfg(not(target_os = "linux"))]
pub fn build() {
// Print a emulation_mode to silence clippy's unexpected cfg on macOS
println!("cargo:rustc-cfg=emulation_mode=\"usermode\"");
println!("cargo:warning=libafl_qemu only builds on Linux hosts");
}
}
#[rustversion::nightly]
fn nightly() {
println!("cargo:rustc-cfg=nightly");
}
#[rustversion::not(nightly)]
fn nightly() {}
fn main() {
println!("cargo:rustc-check-cfg=cfg(nightly)");
nightly();
host_specific::build();
}