Place zcash_proofs::prover::LocalTxProver behind a feature flag
This enables zcash_proofs to be compiled to WASM, which the directories crate doesn't support.
This commit is contained in:
parent
a1cd9dfbac
commit
54ef63bace
|
@ -9,9 +9,13 @@ authors = [
|
||||||
bellman = { path = "../bellman" }
|
bellman = { path = "../bellman" }
|
||||||
blake2b_simd = "0.5"
|
blake2b_simd = "0.5"
|
||||||
byteorder = "1"
|
byteorder = "1"
|
||||||
directories = "1"
|
directories = { version = "1", optional = true }
|
||||||
ff = { path = "../ff" }
|
ff = { path = "../ff" }
|
||||||
pairing = { path = "../pairing" }
|
pairing = { path = "../pairing" }
|
||||||
rand_os = "0.2"
|
rand_os = "0.2"
|
||||||
sapling-crypto = { path = "../sapling-crypto" }
|
sapling-crypto = { path = "../sapling-crypto" }
|
||||||
zcash_primitives = { path = "../zcash_primitives" }
|
zcash_primitives = { path = "../zcash_primitives" }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["local-prover"]
|
||||||
|
local-prover = ["directories"]
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
extern crate bellman;
|
extern crate bellman;
|
||||||
extern crate blake2b_simd;
|
extern crate blake2b_simd;
|
||||||
extern crate byteorder;
|
extern crate byteorder;
|
||||||
extern crate directories;
|
|
||||||
extern crate ff;
|
extern crate ff;
|
||||||
extern crate pairing;
|
extern crate pairing;
|
||||||
extern crate rand_os;
|
extern crate rand_os;
|
||||||
extern crate sapling_crypto;
|
extern crate sapling_crypto;
|
||||||
extern crate zcash_primitives;
|
extern crate zcash_primitives;
|
||||||
|
|
||||||
|
#[cfg(feature = "local-prover")]
|
||||||
|
extern crate directories;
|
||||||
|
|
||||||
use bellman::groth16::{prepare_verifying_key, Parameters, PreparedVerifyingKey, VerifyingKey};
|
use bellman::groth16::{prepare_verifying_key, Parameters, PreparedVerifyingKey, VerifyingKey};
|
||||||
use pairing::bls12_381::Bls12;
|
use pairing::bls12_381::Bls12;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
@ -15,9 +17,11 @@ use std::io::{self, BufReader};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
mod hashreader;
|
mod hashreader;
|
||||||
pub mod prover;
|
|
||||||
pub mod sapling;
|
pub mod sapling;
|
||||||
|
|
||||||
|
#[cfg(feature = "local-prover")]
|
||||||
|
pub mod prover;
|
||||||
|
|
||||||
pub fn load_parameters(
|
pub fn load_parameters(
|
||||||
spend_path: &Path,
|
spend_path: &Path,
|
||||||
spend_hash: &str,
|
spend_hash: &str,
|
||||||
|
|
Loading…
Reference in New Issue