mirror of
https://github.com/eth-act/ere.git
synced 2026-04-03 03:00:17 -04:00
* feat: add `ere-zisk` and `compile` functionality * fix: use `FixintEncoding` for `Input::as_bytes` to make it deterministic * feat: implement `zkVM::execute` * fix: make `install_zisk_sdk.sh` work with docker * chore: add comment why use `#[should_panic]` * feat: use command `cargo-zisk ...` for `compile`, `execute`, `prove` and `verify` * ci * fix: invalid proof
15 lines
273 B
Rust
15 lines
273 B
Rust
#![no_main]
|
|
|
|
ziskos::entrypoint!(main);
|
|
|
|
fn main() {
|
|
// Read an input
|
|
let n = u32::from_le_bytes(
|
|
ziskos::read_input()
|
|
.try_into()
|
|
.expect("input to be 4 bytes"),
|
|
);
|
|
// Write n*2 to output
|
|
ziskos::set_output(0, n * 2);
|
|
}
|