snarkvm_algorithms/
lib.rs

1// Copyright 2024 Aleo Network Foundation
2// This file is part of the snarkVM library.
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at:
7
8// http://www.apache.org/licenses/LICENSE-2.0
9
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#![warn(unsafe_code)]
17#![allow(clippy::module_inception)]
18#![allow(clippy::type_complexity)]
19#![cfg_attr(test, allow(clippy::assertions_on_result_states))]
20
21#[cfg(feature = "wasm")]
22#[macro_use]
23extern crate alloc;
24
25#[allow(unused_imports)]
26#[macro_use]
27extern crate aleo_std;
28#[macro_use]
29extern crate thiserror;
30
31pub use snarkvm_utilities::{cfg_chunks, cfg_chunks_mut, cfg_into_iter, cfg_iter, cfg_iter_mut, cfg_reduce};
32
33#[cfg(feature = "crypto_hash")]
34pub mod crypto_hash;
35#[cfg(feature = "fft")]
36pub mod fft;
37#[cfg(feature = "msm")]
38pub mod msm;
39#[cfg(feature = "polycommit")]
40pub mod polycommit;
41#[cfg(feature = "r1cs")]
42pub mod r1cs;
43#[cfg(feature = "snark")]
44pub mod snark;
45
46pub mod srs;
47
48pub mod errors;
49pub use errors::*;
50
51pub mod traits;
52pub use traits::*;
53
54pub mod prelude {
55    pub use crate::{errors::*, traits::*};
56
57    #[cfg(feature = "polycommit")]
58    pub use crate::polycommit::error::*;
59    #[cfg(feature = "r1cs")]
60    pub use crate::r1cs::errors::*;
61}