openvm_stark_backend/
lib.rs

1//! Backend for proving and verifying mixed-matrix STARKs.
2//! The backend is designed to be modular and compatible with different proof systems.
3//! The aim is to support different circuit representations and permutation/lookup arguments.
4
5// Re-export all Plonky3 crates
6pub use p3_air;
7pub use p3_challenger;
8pub use p3_commit;
9pub use p3_field;
10pub use p3_matrix;
11pub use p3_maybe_rayon;
12pub use p3_util;
13
14/// AIR builders for prover and verifier, including support for cross-matrix permutation arguments.
15pub mod air_builders;
16/// Trait for stateful chip that owns trace generation
17mod chip;
18/// Helper types associated to generic STARK config.
19pub mod config;
20/// Trait for STARK backend engine proving keygen, proviing, verifying API functions.
21pub mod engine;
22/// GKR batch prover for Grand Product and LogUp lookup arguments.
23pub mod gkr;
24/// Log-up permutation argument implementation as RAP.
25pub mod interaction;
26/// Proving and verifying key generation
27pub mod keygen;
28/// Polynomials
29pub mod poly;
30/// Definition of the STARK proof struct.
31pub mod proof;
32pub mod prover;
33/// Trait for RAP (Randomized AIR with Preprocessing)
34pub mod rap;
35pub mod sumcheck;
36/// Utility functions
37pub mod utils;
38/// Verifier implementation
39pub mod verifier;
40
41pub use chip::{Chip, ChipUsageGetter};
42pub use rap::AirRef;
43
44// Use jemalloc as global allocator for performance
45#[cfg(all(feature = "jemalloc", unix, not(test)))]
46#[global_allocator]
47static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
48
49// Use mimalloc as global allocator
50#[cfg(all(feature = "mimalloc", not(test)))]
51#[global_allocator]
52static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;