Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 2.04 KB

README.md

File metadata and controls

79 lines (56 loc) · 2.04 KB

Build and Test Instructions

Prerequisites

Before building and testing the project, make sure you have the following installed:

1. Install Go

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.

2. Install Rust

Make sure you have Rust installed by following the instructions here.

Logging Configuration

The verifier uses two logging systems:

  • Rust logging via tokio-tracing, configured through the RUST_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

3. Install Haskell (Cabal)

Ensure that you have Haskell and Cabal installed by following the instructions here.

Build steps

  • 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

Testing

To run tests for the Rust components, execute:

cargo test

To run the example Haskell application, execute:

cabal run test

Troubleshooting

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.