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/// Log-up permutation argument implementation as RAP.
23pub mod interaction;
24/// Proving and verifying key generation
25pub mod keygen;
26/// Definition of the STARK proof struct.
27pub mod proof;
28pub mod prover;
29/// Trait for RAP (Randomized AIR with Preprocessing)
30pub mod rap;
31/// Utility functions
32pub mod utils;
33/// Verifier implementation
34pub mod verifier;
35
36pub use chip::{AnyChip, Chip, ChipUsageGetter};
37pub use rap::AirRef;
38
39// Use jemalloc as global allocator for performance
40#[cfg(all(feature = "jemalloc", unix, not(test)))]
41#[global_allocator]
42static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
43
44// Use mimalloc as global allocator
45#[cfg(all(feature = "mimalloc", not(test)))]
46#[global_allocator]
47static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;