Crate sp1_lib

source ·
Expand description

Precompiles for the SP1 zkVM.

Specifically, this crate contains user-friendly functions that call SP1 syscalls. Syscalls are also declared here for convenience. In order to avoid duplicate symbol errors, the syscall function impls must live in sp1-zkvm, which is only imported into the end user program crate. In contrast, sp1-precompiles can be imported into any crate in the dependency tree.

Modules§

Macros§

  • Executes a block of code unconstrained by the VM. This macro is useful for running code that helps provide information to the program but does not need to be constrained by the VM. For example, running ecrecover is expensive in the VM but verifying a signature when you know the public key is not. unconstrained can be used to provide the public key without spending VM CPU cycles.

Constants§

Functions§