phase2-bn254/src/lib.rs

59 lines
1009 B
Rust
Raw Normal View History

2018-12-08 00:31:26 +03:00
#![allow(unused_imports)]
extern crate pairing as pairing_import;
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
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
#[cfg(feature = "multicore")]
mod multicore;
2018-02-14 22:31:43 +03:00
#[cfg(feature = "singlecore")]
mod singlecore;
mod worker {
#[cfg(feature = "multicore")]
pub use crate::multicore::*;
2019-02-10 01:44:01 +03:00
#[cfg(feature = "singlecore")]
pub use crate::singlecore::*;
2017-11-21 10:04:49 +03:00
}
pub mod pairing {
pub use pairing_import::*;
2017-11-21 10:04:49 +03:00
}
mod cs;
pub use self::cs::*;
2018-12-08 00:31:26 +03:00
static mut VERBOSE_SWITCH: i8 = -1;
use std::str::FromStr;
use std::env;
fn verbose_flag() -> bool {
unsafe {
if VERBOSE_SWITCH < 0 {
2018-12-21 06:24:33 +03:00
VERBOSE_SWITCH = FromStr::from_str(&env::var("BELLMAN_VERBOSE").unwrap_or(String::new())).unwrap_or(1);
2018-12-08 00:31:26 +03:00
}
match VERBOSE_SWITCH {
1 => true,
_ => false,
}
}
}