2018-12-08 00:31:26 +03:00
|
|
|
#![allow(unused_imports)]
|
|
|
|
|
2019-03-04 23:04:39 +03:00
|
|
|
extern crate pairing as pairing_import;
|
2018-02-14 22:31:43 +03:00
|
|
|
extern crate rand;
|
2019-02-11 21:58:23 +03:00
|
|
|
extern crate bit_vec;
|
|
|
|
extern crate byteorder;
|
2018-02-14 22:31:43 +03:00
|
|
|
|
|
|
|
pub mod domain;
|
|
|
|
pub mod groth16;
|
2019-03-04 23:04:39 +03:00
|
|
|
|
|
|
|
#[cfg(feature = "gm17")]
|
2019-02-01 18:36:50 +03:00
|
|
|
pub mod gm17;
|
2019-03-04 23:04:39 +03:00
|
|
|
#[cfg(feature = "sonic")]
|
2019-02-04 13:18:44 +03:00
|
|
|
pub mod sonic;
|
2019-02-01 18:36:50 +03:00
|
|
|
|
2019-02-10 01:36:40 +03:00
|
|
|
mod group;
|
|
|
|
mod source;
|
2019-03-04 23:04:39 +03:00
|
|
|
mod multiexp;
|
2019-02-10 01:36:40 +03:00
|
|
|
|
2019-02-01 18:36:50 +03:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests;
|
2017-11-21 10:04:49 +03:00
|
|
|
|
2019-03-04 23:04:39 +03:00
|
|
|
#[cfg(feature = "multicore")]
|
|
|
|
mod multicore;
|
2018-02-14 22:31:43 +03:00
|
|
|
|
2019-03-04 23:04:39 +03:00
|
|
|
#[cfg(feature = "singlecore")]
|
|
|
|
mod singlecore;
|
2019-02-10 01:36:40 +03:00
|
|
|
|
2019-03-04 23:04:39 +03:00
|
|
|
mod worker {
|
|
|
|
#[cfg(feature = "multicore")]
|
|
|
|
pub use crate::multicore::*;
|
2019-02-10 01:36:40 +03:00
|
|
|
|
2019-02-10 01:44:01 +03:00
|
|
|
#[cfg(feature = "singlecore")]
|
2019-03-04 23:04:39 +03:00
|
|
|
pub use crate::singlecore::*;
|
2017-11-21 10:04:49 +03:00
|
|
|
}
|
|
|
|
|
2019-03-04 23:04:39 +03:00
|
|
|
pub mod pairing {
|
|
|
|
pub use pairing_import::*;
|
2017-11-21 10:04:49 +03:00
|
|
|
}
|
|
|
|
|
2019-03-04 23:04:39 +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,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|