This is a guide with helpful information for developers who want to contribute to the SP1 project.
You can run the test suite in SP1 core by running the following command:
cd core
cargo test
We recommend you install the rust-analyzer extension.
Note that if you use cargo prove new
inside a monorepo, you will need to add the path to the Cargo.toml file to rust-analyzer.linkedProjects
to get full IDE support.
Debug Constraint Failure
To debug constraint failures, you can use the --features debug
feature. For example:
RUST_LOG=info RUST_BACKTRACE=1 cargo test syscall::precompiles::edwards::ed_add::tests::test_ed_add_simple --release --features debug -- --nocapture
To build docs locally, run the following commands in the top-level directory:
cargo install mdbook # Installs mdbook locally
mdbook serve # Serves the docs locally
SP1 crates are hosted on crates.io. We use release-plz to automate the publication process, and it is configured with release-plz.toml and .github/workflows/release-plz.yml.
With this configuration, when the dev
branch is pushed to, the following should happen:
release-plz
creates a pull request with the new version.- When we are ready to create a release, we merge the pull request.
- After merging the pull request,
release-plz
publishes the packages.
After the release pull request has been merged to dev
, only then should we merge dev
into main
and create a GitHub release for the new version.
In the case that the automated publish does not work, you can manually do this by installing release-plz and preparing the crates with:
release-plz update
and then publishing the crates with:
release-plz release --git-token $GITHUB_TOKEN