Closed aseaday closed 1 year ago
@aseaday I was trying to look around for something like this, so I could explore the project. currently having a hard time understanding some possibly basic things:
wasm_bindgen
We now have zkWASM-C repo as a project template: https://github.com/DelphinusLab/zkWasm-C. rust to zkWASM problem is solved in #69. Will leave this thread to track the progress of documentation.
We now have two more demo projects: Rust project demo: https://github.com/xgaozoyoe/zkWasm-Rust-Demo Assembly script demo: https://github.com/DelphinusLab/zkWasm-AssemblyScript-Demo
@xgaozoyoe I'm still not sure how to read input in rust? Basically how do I call wasm_input
?
This is not shown in the rust demo, could you help me?
@KuTuGu here's an example:
extern "C" {
fn wasm_input(x: i32) -> i64;
}
#[wasm_bindgen]
pub fn add() -> i64 {
let x = unsafe { wasm_input(1) };
let y = 5;
x + y
}
Description
Seeing that we now have a CLI binary, users and developers could have a easy use case on zkwasm. The current docments is a design document than a getting started or quick introduction We may give a better and clean README.md for people to be interested in our projects.