Coding Verifiable Components
Proven Network uses a virtual machine which can run code targeting the WASM Component Model. Let's look at an example component!
wit/rock-paper-scissors.wit
Here we're defining a simple rock-paper-scissors games which allows player to call a play function with their selected move and get an outcome in return.
WIT files are used by language-specific build tools to automatically handle all required codegen. Let's implement the play function in Rust using the cargo-component tooling.
src/lib.rs
Accessing persistent storage
Coming soon
Further reading on the Webassembly Component Model
Further documentation on the WA Component Model can be found on the Bytecode Alliance documentation site: https://component-model.bytecodealliance.org/
Last updated