mirror of
https://github.com/eth-act/ere.git
synced 2026-04-03 03:00:17 -04:00
add basic tests for risczero project
This commit is contained in:
12
tests/risczero/project_structure_build/Cargo.toml
Normal file
12
tests/risczero/project_structure_build/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "methods"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
|
||||
[build-dependencies]
|
||||
risc0-build = { version = "^2.1.1" }
|
||||
|
||||
[package.metadata.risc0]
|
||||
methods = ["guest"]
|
||||
3
tests/risczero/project_structure_build/build.rs
Normal file
3
tests/risczero/project_structure_build/build.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
risc0_build::embed_methods();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "risc0guest",
|
||||
"elf_path": "/Users/kev/work/ere/tests/risczero/project_structure_build/target/riscv-guest/methods/risc0guest/riscv32im-risc0-zkvm-elf/release/risc0guest.bin",
|
||||
"image_id_hex": "6a0d2e9f10ded46c571e644cdf8776e8f96be1844df36386fdee6c0a0e90084c"
|
||||
}
|
||||
9
tests/risczero/project_structure_build/guest/Cargo.toml
Normal file
9
tests/risczero/project_structure_build/guest/Cargo.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "risc0guest"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
|
||||
[dependencies]
|
||||
risc0-zkvm = { version = "^2.0.2", default-features = false, features = ['std'] }
|
||||
13
tests/risczero/project_structure_build/guest/src/main.rs
Normal file
13
tests/risczero/project_structure_build/guest/src/main.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use risc0_zkvm::guest::env;
|
||||
|
||||
fn main() {
|
||||
// TODO: Implement your guest code here
|
||||
|
||||
// read the input
|
||||
let input: u32 = env::read();
|
||||
|
||||
// TODO: do something with the input
|
||||
|
||||
// write public output to the journal
|
||||
env::commit(&input);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "stable"
|
||||
components = ["rustfmt", "rust-src"]
|
||||
profile = "minimal"
|
||||
1
tests/risczero/project_structure_build/src/lib.rs
Normal file
1
tests/risczero/project_structure_build/src/lib.rs
Normal file
@@ -0,0 +1 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/methods.rs"));
|
||||
Reference in New Issue
Block a user