Skip to main content

kimchi/
lib.rs

1#![doc = include_str!("../README.md")]
2#![cfg_attr(not(feature = "std"), no_std)]
3// Allow non_local_definitions from derive macros (proptest_derive, ocaml)
4// until upstream crates are updated.
5// See https://github.com/o1-labs/mina-rust/issues/1954
6#![allow(non_local_definitions)]
7
8extern crate alloc;
9
10// Re-export alloc types so all modules have access in no_std mode.
11// This is used instead of patching every file individually.
12#[allow(unused_imports)]
13#[doc(hidden)]
14mod prelude {
15    pub use alloc::{
16        borrow::ToOwned,
17        boxed::Box,
18        format,
19        string::{String, ToString},
20        vec,
21        vec::Vec,
22    };
23}
24
25// Pull prelude into scope for all modules in this crate.
26#[allow(unused_imports)]
27use prelude::*;
28
29pub use poly_commitment::collections;
30
31pub use groupmap;
32pub use mina_curves;
33pub use mina_poseidon;
34pub use o1_utils;
35pub use poly_commitment;
36
37pub mod alphas;
38#[cfg(feature = "prover")]
39pub mod bench;
40#[cfg(feature = "mmap_cache")]
41pub mod cached_prover_index;
42pub mod circuits;
43pub mod curve;
44pub mod error;
45#[cfg(feature = "prover")]
46pub mod lagrange_basis_evaluations;
47pub mod linearization;
48pub mod oracles;
49pub mod plonk_sponge;
50pub mod proof;
51#[cfg(feature = "prover")]
52pub mod prover;
53#[cfg(feature = "prover")]
54pub mod prover_index;
55pub mod verifier;
56pub mod verifier_index;
57
58#[cfg(test)]
59mod tests;
60
61/// Handy macro to return the filename and line number of a place in the code.
62#[macro_export]
63macro_rules! loc {
64    () => {{
65        ::alloc::borrow::Cow::Owned(format!("{}:{}", file!(), line!()))
66    }};
67}