mirror of
https://github.com/eth-act/ere.git
synced 2026-04-03 03:00:17 -04:00
add basic compile test case for ere-sp1
This commit is contained in:
2
tests/.gitignore
vendored
Normal file
2
tests/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
**/target
|
||||
**/Cargo.lock
|
||||
9
tests/sp1/compile/basic/Cargo.toml
Normal file
9
tests/sp1/compile/basic/Cargo.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "pacto-test-succinct-guest"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
|
||||
[dependencies]
|
||||
sp1-zkvm = { git = "https://github.com/succinctlabs/sp1.git" }
|
||||
10
tests/sp1/compile/basic/src/main.rs
Normal file
10
tests/sp1/compile/basic/src/main.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
#![no_main]
|
||||
|
||||
sp1_zkvm::entrypoint!(main);
|
||||
|
||||
pub fn main() {
|
||||
// Read an input
|
||||
let n = sp1_zkvm::io::read::<u32>();
|
||||
// Write n*2 to output
|
||||
sp1_zkvm::io::commit(&(n * 2));
|
||||
}
|
||||
Reference in New Issue
Block a user