phase2-bn254/bellman/src/lib.rs

55 lines
928 B
Rust
Raw Normal View History

2018-12-08 00:31:26 +03:00
#![allow(unused_imports)]
#![allow(unused_macros)]
2019-03-24 07:47:47 +03:00
#[macro_use]
2018-12-08 00:31:26 +03:00
2019-03-24 07:47:47 +03:00
extern crate cfg_if;
2019-07-13 16:58:25 +03:00
pub extern crate pairing;
2018-02-14 22:31:43 +03:00
extern crate rand;
extern crate bit_vec;
extern crate byteorder;
2018-02-14 22:31:43 +03:00
#[macro_use]
mod log;
2018-02-14 22:31:43 +03:00
pub mod domain;
pub mod groth16;
#[cfg(feature = "gm17")]
2019-02-01 18:36:50 +03:00
pub mod gm17;
#[cfg(feature = "sonic")]
pub mod sonic;
2019-02-01 18:36:50 +03:00
mod group;
mod source;
mod multiexp;
2019-02-01 18:36:50 +03:00
#[cfg(test)]
mod tests;
2017-11-21 10:04:49 +03:00
2019-03-24 07:47:47 +03:00
cfg_if! {
if #[cfg(feature = "multicore")] {
2019-03-26 10:20:20 +03:00
#[cfg(feature = "wasm")]
compile_error!("Multicore feature is not yet compatible with wasm target arch");
2019-09-02 15:50:18 +03:00
pub mod multicore;
2019-03-24 07:47:47 +03:00
mod worker {
pub use crate::multicore::*;
}
} else {
2019-09-02 15:50:18 +03:00
pub mod singlecore;
2019-03-24 07:47:47 +03:00
mod worker {
pub use crate::singlecore::*;
}
}
2017-11-21 10:04:49 +03:00
}
mod cs;
pub use self::cs::*;
2018-12-08 00:31:26 +03:00
use std::str::FromStr;
use std::env;
fn verbose_flag() -> bool {
2019-03-31 09:08:33 +03:00
option_env!("BELLMAN_VERBOSE").unwrap_or("0") == "1"
2019-09-02 15:50:18 +03:00
}