Files
ere/tests/zisk/compile/basic/src/main.rs
Han 5b5a012e26 feat: Add ere-zisk with only compile and execute utility. (#27)
* 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
2025-05-28 15:49:04 +01:00

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