Merge singlecore and multicore configs

This commit is contained in:
poma 2019-03-24 07:47:47 +03:00
parent 6e45a4b233
commit 9819e9e08b
2 changed files with 15 additions and 12 deletions

View File

@ -16,6 +16,7 @@ crate-type = ["cdylib", "lib", "staticlib"]
rand = "0.4" rand = "0.4"
bit-vec = "0.4.4" bit-vec = "0.4.4"
futures = "0.1" futures = "0.1"
cfg-if = "0.1.7"
pairing = { git = 'https://github.com/matterinc/pairing', tag = "0.16.2" } pairing = { git = 'https://github.com/matterinc/pairing', tag = "0.16.2" }
#pairing = { path = "../pairing" } #pairing = { path = "../pairing" }

View File

@ -1,5 +1,7 @@
#![allow(unused_imports)] #![allow(unused_imports)]
#[macro_use]
extern crate cfg_if;
extern crate pairing as pairing_import; extern crate pairing as pairing_import;
extern crate rand; extern crate rand;
extern crate bit_vec; extern crate bit_vec;
@ -20,18 +22,18 @@ mod multiexp;
#[cfg(test)] #[cfg(test)]
mod tests; mod tests;
#[cfg(feature = "multicore")] cfg_if! {
mod multicore; if #[cfg(feature = "multicore")] {
mod multicore;
#[cfg(feature = "singlecore")] mod worker {
mod singlecore; pub use crate::multicore::*;
}
mod worker { } else {
#[cfg(feature = "multicore")] mod singlecore;
pub use crate::multicore::*; mod worker {
pub use crate::singlecore::*;
#[cfg(feature = "singlecore")] }
pub use crate::singlecore::*; }
} }
pub mod pairing { pub mod pairing {