Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
7 changes: 6 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,8 @@ toml = "0.5.9"
cargo-binutils = "0.3.6"
rustc_version = "0.4"
xdg = "2.4"

[features]
default = ["sancov_8bit"]
sancov_8bit = []
tui = []
12 changes: 9 additions & 3 deletions cargo-libafl/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ 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");
cmd.arg("--no-default-features");
#[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
20 changes: 15 additions & 5 deletions cargo-libafl/cargo-libafl-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@ name = "cargo-libafl-runtime"
# 13.3.7 is a dummy value for templating purposes, it will be replaced with the actual version by ../build.rs
version = "13.3.7"
authors = ["Andrea Fioraldi <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "The runtime lib for cargo-libafl"
repository = "https://github.com/AFLplusplus/cargo-libafl"
edition = "2021"
description = "The runtime lib for cargo-libafl"

[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 = "6d2284d" }
libafl_targets = { git = "https://github.com/AFLplusplus/LibAFL.git", rev = "6d2284d", features = ["sancov_8bit", "sancov_pcguard", "sancov_cmplog", "pointer_maps"] }
# libafl = "0.10"
# libafl_targets = { version = "0.10", features = ["sancov_8bit", "sancov_pcguard", "sancov_cmplog", "pointer_maps"] }

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

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

[features]
default = [ "sancov_8bit" ]
sancov_8bit = []
tui = []
Loading