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;
40pub mod circuits;
41pub mod curve;
42pub mod error;
43#[cfg(feature = "prover")]
44pub mod lagrange_basis_evaluations;
45pub mod linearization;
46pub mod oracles;
47pub mod plonk_sponge;
48pub mod proof;
49#[cfg(feature = "prover")]
50pub mod prover;
51#[cfg(feature = "prover")]
52pub mod prover_index;
53pub mod verifier;
54pub mod verifier_index;
55
56#[cfg(test)]
57mod tests;
58
59/// Handy macro to return the filename and line number of a place in the code.
60#[macro_export]
61macro_rules! loc {
62    () => {{
63        ::alloc::borrow::Cow::Owned(format!("{}:{}", file!(), line!()))
64    }};
65}