Before building and testing the project, make sure you have the following installed:
If you don't already have Go installed, you can install it using the following commands:
# For Linux and macOS:
wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
# For macOS using Homebrew:
brew install go
# For Windows:
Download the installer from https://go.dev/dl/ and follow the installation instructions.
Make sure you have Rust installed by following the instructions here.
The verifier uses two logging systems:
- Rust logging via
tokio-tracing
, configured through theRUST_LOG
environment variable. See the tracing documentation for detailed configuration options. - Go logging for FFI calls, configured through the
SP1_GO_LOG
environment variable.
To set a global log level (e.g. warn), configure both variables:
RUST_LOG=warn SP1_GO_LOG=warn ./plonk-verify ...
Valid log levels are: error, warn, info, debug, trace, off
Ensure that you have Haskell and Cabal installed by following the instructions here.
- Build the Rust part of the project:
cargo build --release
- (For macOS only/cabal repl only) Build the dynamic library:
cargo rustc --release --crate-type cdylib
- Build the Haskell part of the project:
cabal build
To run tests for the Rust components, execute:
cargo test
To run the example Haskell application, execute:
cabal run test
If you get "error while loading shared libraries", try:
cargo clean
This happens if the library is built against the .so
file, and can happen if you ran cargo rustc --crate-type cdylib
in the past.