⚠️ Work in ProgressStwo is currently under active development and is not recommended for production use.
Stwo is a next-generation implementation of a Circle STARK (CSTARK) prover and verifier framework, written in Rust 🦀. While it includes example implementations for demonstration purposes, the primary purpose of this repository is to serve as a foundational framework for building more complex, production-grade provers.
The framework provides a high-performance, flexible foundation for generating and verifying STARK proofs using the latest cryptographic research and innovations in STARK proof systems. It is designed to be extended and customized for specific use cases beyond the simple examples included in this repository.
- Circle STARKs: Implementation based on the latest cryptographic research and innovations in STARK proof systems
- High Performance: Designed for extreme speed and efficiency with optimized SIMD operations
- Rust Toolchain: This project requires Rust nightly (see
rust-toolchain.tomlfor the specific version)
Clone the repository and build the project:
git clone https://github.com/starkware-libs/stwo.git
cd stwo
cargo build --releaseThe project includes example implementations in the crates/examples directory:
# Run examples
cargo run --release --example <example_name>This is a Rust workspace containing multiple crates:
crates/stwo- Core library implementing the Circle STARK prover and verifiercrates/constraint-framework- Framework for expressing and evaluating constraintscrates/air-utils- Utilities for working with Arithmetic Intermediate Representation (AIR)crates/air-utils-derive- Derive macros for AIR utilitiescrates/examples- Example implementations demonstrating basic usagecrates/std-shims- Standard library shims forno_stdcompatibility
While the examples in this repository demonstrate basic usage patterns, Stwo is designed as a framework for building sophisticated provers that handle complex real-world scenarios. A prominent example of such an application is:
stwo-cairo is a production-oriented prover built on top of the Stwo framework that enables proving Cairo program executions.
Run a single-threaded Poseidon2 hash proof benchmark:
./poseidon_benchmark.shRun all benchmarks using Cargo:
cargo benchVisual representation of benchmark results can be found at: https://starkware-libs.github.io/stwo/dev/bench/index.html
This project is licensed under the Apache License 2.0.
See the LICENSE file for more information.
