Skip to content

Commit

Permalink
Move the test program
Browse files Browse the repository at this point in the history
  • Loading branch information
TlatoaniHJ committed Jan 9, 2025
1 parent e1eef6a commit 3f173ec
Show file tree
Hide file tree
Showing 11 changed files with 139 additions and 20 deletions.
48 changes: 46 additions & 2 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ members = [
"extensions/native/recursion",
"extensions/native/transpiler",
"extensions/native/guest-macro",
"extensions/native/guest-macro/test",
"extensions/native/serialization",
"extensions/algebra/circuit",
"extensions/algebra/transpiler",
Expand Down Expand Up @@ -139,6 +140,8 @@ openvm-native-compiler = { path = "extensions/native/compiler", default-features
openvm-native-compiler-derive = { path = "extensions/native/compiler/derive", default-features = false }
openvm-native-recursion = { path = "extensions/native/recursion", default-features = false }
openvm-native-guest-macro = { path = "extensions/native/guest-macro", default-features = false }
openvm-native-integration-test = { path = "extensions/native/guest-macro/test", default-features = false }

openvm-native-transpiler = { path = "extensions/native/transpiler", default-features = false }
openvm-native-serialization = { path = "extensions/native/serialization", default-features = false }
openvm-keccak256-circuit = { path = "extensions/keccak256/circuit", default-features = false }
Expand Down
13 changes: 0 additions & 13 deletions benchmarks/programs/test_kernel/Cargo.toml

This file was deleted.

3 changes: 3 additions & 0 deletions crates/toolchain/build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ const GUEST_LOGFILE_ENV: &str = "OPENVM_GUEST_LOGFILE";
/// Returns the given cargo Package from the metadata in the Cargo.toml manifest
/// within the provided `manifest_dir`.
pub fn get_package(manifest_dir: impl AsRef<Path>) -> Package {
println!("manifest_dir = {:?}", manifest_dir.as_ref());
println!("manifest_dir.join(\"Cargo.toml\") = {:?}", manifest_dir.as_ref().join("Cargo.toml"));
let manifest_path = fs::canonicalize(manifest_dir.as_ref().join("Cargo.toml")).unwrap();
println!("manifest_path = {:?}", manifest_path);
let manifest_meta = MetadataCommand::new()
.manifest_path(&manifest_path)
.no_deps()
Expand Down
69 changes: 69 additions & 0 deletions extensions/native/guest-macro/test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[package]
name = "openvm-native-integration-test"
version.workspace = true
authors.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
openvm-build.workspace = true
openvm-circuit.workspace = true
openvm-circuit-primitives-derive.workspace = true
openvm-sdk.workspace = true
openvm-stark-backend.workspace = true
openvm-stark-sdk.workspace = true
openvm-transpiler.workspace = true
openvm-native-transpiler.workspace = true

openvm-algebra-circuit.workspace = true
openvm-algebra-transpiler.workspace = true
openvm-ecc-circuit.workspace = true
openvm-ecc-transpiler.workspace = true
openvm-keccak256-circuit.workspace = true
openvm-keccak256-transpiler.workspace = true
openvm-keccak256-guest.workspace = true
openvm-native-circuit.workspace = true
openvm-native-compiler.workspace = true
openvm-native-recursion = { workspace = true, features = ["test-utils"] }
openvm-rv32im-circuit.workspace = true
openvm-rv32im-transpiler.workspace = true

openvm-benchmarks = { path = "../../../../benchmarks" }

clap = { version = "4.5.9", features = ["derive", "env"] }
eyre.workspace = true
tempfile.workspace = true
metrics.workspace = true
tracing.workspace = true
hex.workspace = true
tokio = { version = "1.41.1", features = ["rt", "rt-multi-thread", "macros"] }
rand_chacha = { version = "0.3", default-features = false }
k256 = { workspace = true, features = ["ecdsa"] }
tiny-keccak.workspace = true
derive-new.workspace = true
derive_more = { workspace = true, features = ["from"] }
num-bigint-dig = { workspace = true, features = ["std", "serde"] }
serde.workspace = true
bincode = { version = "2.0.0-rc.3" }

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
pprof = { version = "0.13", features = [
"criterion",
"flamegraph",
"frame-pointer",
] }

[features]
default = ["parallel", "mimalloc", "bench-metrics"]
bench-metrics = ["openvm-native-recursion/bench-metrics"]
profiling = ["openvm-sdk/profiling"]
aggregation = []
static-verifier = ["openvm-native-recursion/static-verifier"]
parallel = ["openvm-native-recursion/parallel"]
mimalloc = ["openvm-circuit/mimalloc"]
jemalloc = ["openvm-circuit/jemalloc"]
jemalloc-prof = ["openvm-circuit/jemalloc-prof"]
nightly-features = ["openvm-circuit/nightly-features"]
13 changes: 13 additions & 0 deletions extensions/native/guest-macro/test/program/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[workspace]
[package]
name = "openvm-native-integration-test-program"
version = "0.0.0"
edition = "2021"

[dependencies]
openvm = { path = "../../../../../crates/toolchain/openvm" }
openvm-native-guest-macro = { path = "../.." }

[features]
default = []
std = ["openvm/std"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ version = "0.1.0"
edition = "2021"

[dependencies]
openvm-native-compiler = { path = "../../../../extensions/native/compiler" }
openvm-native-serialization = { path = "../../../../extensions/native/serialization" }
openvm-instructions = { path = "../../../../crates/toolchain/instructions" }
openvm-native-compiler = { path = "../../../../compiler" }
openvm-native-serialization = { path = "../../../../serialization" }
openvm-instructions = { path = "../../../../../../crates/toolchain/instructions" }
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", rev = "c785515", default-features = false }
openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", rev = "c785515", default-features = false }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn function_name(builder: &mut AsmBuilder<F, EF>, n: Var<F>) -> Felt<F> {
}

fn main() {
let mut file = File::create("../compiler_output.txt").unwrap();
let mut file = File::create("../../compiler_output.txt").unwrap();

let mut builder = AsmBuilder::<F, EF>::default();

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use openvm_transpiler::{transpiler::Transpiler, FromElf};
fn main() -> Result<()> {
let args = BenchmarkCli::parse();

let elf = args.build_bench_program("test_kernel")?;
let elf = args.build_bench_program("../../extensions/native/guest-macro/test/program")?;
let exe = VmExe::from_elf(
elf.clone(),
Transpiler::<BabyBear>::default()
Expand Down

0 comments on commit 3f173ec

Please sign in to comment.