Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ejection of fuzzing fixtures #25

Closed
wants to merge 13 commits into from
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ jobs:
cargo build-sbf --manifest-path test-programs/cpi-target/Cargo.toml
cargo build-sbf --manifest-path test-programs/primary/Cargo.toml
- name: Test
run: cargo test
run: cargo test --all-features
183 changes: 183 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"bencher",
"fuzz",
"harness",
"test-programs/cpi-target",
"test-programs/primary",
Expand All @@ -17,9 +18,15 @@ version = "0.0.4"

[workspace.dependencies]
bincode = "1.3.3"
bs58 = "0.5.1"
mollusk-svm = { path = "harness", version = "0.0.4" }
mollusk-svm-bencher = { path = "bencher", version = "0.0.4" }
mollusk-svm-fuzz = { path = "fuzz", version = "0.0.4" }
num-format = "0.4.4"
prost = "0.10"
prost-build = "0.10"
prost-types = "0.10"
serde = "1.0.203"
serde_json = "1.0.117"
solana-bpf-loader-program = "2.0"
solana-compute-budget = "2.0"
Expand Down
22 changes: 22 additions & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "mollusk-svm-fuzz"
description = "SVM program fuzz harness."
documentation = "https://docs.rs/mollusk-svm-fuzz"
authors = { workspace = true }
repository = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
version = { workspace = true }

[dependencies]
bs58 = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
solana-compute-budget = { workspace = true }
solana-sdk = { workspace = true }
thiserror = { workspace = true }

[build-dependencies]
prost-build = { workspace = true }
19 changes: 19 additions & 0 deletions fuzz/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use std::io::Result;

fn main() -> Result<()> {
let proto_base_path = std::path::PathBuf::from("proto");

let protos = &[
proto_base_path.join("compute_budget.proto"),
proto_base_path.join("sysvars.proto"),
proto_base_path.join("invoke.proto"),
];

protos
.iter()
.for_each(|proto| println!("cargo:rerun-if-changed={}", proto.display()));

prost_build::compile_protos(protos, &[proto_base_path])?;

Ok(())
}
Loading