How to Prove
CLI Quick Start
Nexus zkVM
- Overview
- Architecture
- Roadmap
- How to Prove
- zkVM Specifications
How to Prove
CLI Quick Start
Quick start a Nexus project using the CLI.
CLI Quick Start
2
cargo install --git https://github.com/nexus-xyz/nexus-zkvm cargo-nexus --tag 'v0.2.4'
Verify the installation:
cargo nexus --help
This should print the available CLI commands.
3
Create a new Nexus project:
cargo nexus new nexus-project
Change directory to the new project:
cd nexus-project
This will create a new Rust project with the following structure:
./nexus-project
├── Cargo.lock
├── Cargo.toml
└── src
└── main.rs
Example zkVM Rust program in ./src/main.rs
:
#![cfg_attr(target_arch = "riscv32", no_std, no_main)]
use nexus_rt::write_log;
#[nexus_rt::main]
fn main() {
write_log("Hello, World!\n");
}
4
cargo nexus run
Expected output:
"Hello, World!"
5
Generate a zero-knowledge proof:
cargo nexus prove
This will generate a proof and store it in ./nexus-proof
.
6
Load and verify the proof:
cargo nexus verify
You should see:
-
Verifying Proof...
-
Finished
when complete
Was this page helpful?
On this page