Basics
The easiest way to understand how to write programs for the SP1 zkVM is to look at some examples.
Example: Fibonacci
This program is from the examples
directory in the SP1 repo which contains several example programs of varying complexity.
Loading...
As you can see, writing programs is as simple as writing normal Rust.
Development Workflow
- Write your Rust program.
- Compile it to a zkVM-compatible ELF.
- Execute the program to verify correctness.
- Generate and verify a proof.
See Inputs & Outputs for details on program I/O handling.