Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cargo-libafl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-libafl"
version = "0.1.8"
version = "0.1.9"
authors = ["Andrea Fioraldi <[email protected]>"]
license = "MIT OR Apache-2.0"
description = "A `cargo` wrapper to fuzz Rust code with `LibAFL`"
Expand Down Expand Up @@ -28,3 +28,7 @@ toml = "0.5.9"
cargo-binutils = "0.3.6"
rustc_version = "0.4"
xdg = "2.4"

[features]
sancov_8bit = []
tui = []
11 changes: 8 additions & 3 deletions cargo-libafl/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ fn main() {
fs::copy(rt_path.join("runtime.rs"), out_path.join("runtime.rs"))
.expect("Couldn't copy runtime.rs");

assert!(Command::new("cargo")
.current_dir(&out_path)
let mut cmd = Command::new("cargo");
cmd.current_dir(&out_path)
.env("CARGO_TARGET_DIR", out_path.join("rt"))
.arg("build")
.arg("build");
#[cfg(feature = "sancov_8bit")]
cmd.arg("--features").arg("sancov_8bit");
#[cfg(feature = "tui")]
cmd.arg("--features").arg("tui");
assert!(cmd
.arg(&format!("--manifest-path={}/Cargo.toml", out_dir))
.arg("--release")
.status()
Expand Down
11 changes: 9 additions & 2 deletions cargo-libafl/cargo-libafl-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ edition = "2021"
[workspace]

[dependencies]
libafl = { git = "https://github.com/AFLplusplus/LibAFL.git", rev = "7ed1ac9" }
libafl_targets = { git = "https://github.com/AFLplusplus/LibAFL.git", rev = "7ed1ac9", features = ["sancov_8bit", "sancov_cmplog"] }
libafl = { git = "https://github.com/AFLplusplus/LibAFL.git", rev = "721c02c" }
libafl_targets = { git = "https://github.com/AFLplusplus/LibAFL.git", rev = "721c02c", features = ["sancov_8bit", "sancov_pcguard", "sancov_cmplog", "pointer_maps"] }

mimalloc = { version = "*", default-features = false }
portpicker = "0.1.1"
clap = { version = "4.0", features = ["derive"] }
env_logger = "0.10"
log = "*"

[profile.release]
lto = true
Expand All @@ -28,3 +31,7 @@ debug = true
[lib]
crate-type = ["staticlib", "rlib"]
path = "runtime.rs"

[features]
sancov_8bit = []
tui = []
Loading