https://github.com/jakehartnell/risc0-cosmwasm-example
https://github.com/jakehartnell/risc0-cosmwasm-example
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jakehartnell/risc0-cosmwasm-example
- Owner: JakeHartnell
- Created: 2022-10-19T11:31:07.000Z (over 3 years ago)
- Default Branch: meow
- Last Pushed: 2022-10-19T11:56:11.000Z (over 3 years ago)
- Last Synced: 2025-04-07T12:13:53.266Z (about 1 year ago)
- Language: Rust
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RISC Zero Rust Starter
The `risc0-rust-starter` repository is a minimal starting project for zero-knowledge software development. In this RISC Zero "Hello World" project, we use zero-knowledge proof techniques to prove that we know the factors of some composite number `N`, without revealing what the factors are.
For more information, check out the [risc0/risc0 repository](https://www.github.com/risc0/risc0) and the [RISC Zero website](https://www.RISCZero.com).
# Quick Start
First, make sure [rustup](https://rustup.rs) is installed. This project uses a [nightly](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) version of [Rust](https://doc.rust-lang.org/book/ch01-01-installation.html). The [`rust-toolchain`](rust-toolchain) file will be used by `cargo` to automatically install the correct version.
To build all methods and execute the method within the zkVM, run the following command:
```
cargo run --release
```
## Zero-Knowledge Programs
A zkVM program is composed of a `host` and a `guest`. The [host](starter/src/main.rs) code runs like any other rust program and launches a zkVM instance using the [Prover](https://docs.rs/risc0-zkvm-host/0.10.0/risc0_zkvm_host/struct.Prover.html) interface. The [guest](methods/guest/src/bin/multiply.rs) code is compiled for `riscv32im` and runs inside a zkVM. Guest code does not have access to `std` since the zkVM is similar to an embedded system. Use the [env](https://docs.rs/risc0-zkvm-guest/0.10.0/risc0_zkvm_guest/env/index.html) in your zkVM guest code to communicate with the host.
## Contributor's Guide
We welcome contributions to documentation and code via [PRs and GitHub Issues](http://www.github.com/risc0).
## Questions, Feedback, and Collaborations
We'd love to hear from you on [Discord](https://discord.gg/risczero) or [Twitter](https://twitter.com/risczero).