add basic tests for risczero project

This commit is contained in:
Kevaundray Wedderburn
2025-05-12 13:54:36 +01:00
parent bfc6ad9068
commit 3465ea75a2
7 changed files with 47 additions and 0 deletions

View 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"]

View File

@@ -0,0 +1,3 @@
fn main() {
risc0_build::embed_methods();
}

View File

@@ -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"
}

View 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'] }

View 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);
}

View File

@@ -0,0 +1,4 @@
[toolchain]
channel = "stable"
components = ["rustfmt", "rust-src"]
profile = "minimal"

View File

@@ -0,0 +1 @@
include!(concat!(env!("OUT_DIR"), "/methods.rs"));