Skip to content

Commit

Permalink
Make blst dependency optional
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-dumitrescu committed Nov 17, 2023
1 parent 6675c1c commit b5da6d1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ strum_macros = "0.20"
zeroize = { version = "1.5" }
ed25519-dalek = { version = "2.0.0", default-features = false }
cryptoxide = { version = "0.4.4", default-features = false, features = ["sha2", "blake2"] }
blst = "=0.3.10"
blst = { version = "0.3.10", optional = true }

proptest = { version = "1.1", optional = true }

[dev-dependencies]
serde_json = "1.0"

[features]
default = ["std"]
default = ["std", "blst"]
blst = ["dep:blst"]
std = ["rand/std", "num-bigint/rand", "libsecp256k1/std", "p256/std", "proptest"]
2 changes: 2 additions & 0 deletions crypto/src/bls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

//! BLS support (min_pk).
#![cfg(feature = "blst")]

use crate::hash::BlsSignature;
use crate::hash::ContractTz4Hash;
use crate::hash::PublicKeyBls;
Expand Down
1 change: 1 addition & 0 deletions crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use thiserror::Error;
#[macro_use]
pub mod blake2b;
pub mod base58;
#[cfg(feature = "blst")]
pub mod bls;
#[macro_use]
pub mod hash;
Expand Down
5 changes: 3 additions & 2 deletions tezos-encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ default-features = false
path = "../tezos-encoding-derive"
version = "0.5.1"

[features]

[dev-dependencies]
serde_json = "1.0"

[features]
blst = ["tezos_crypto_rs/blst"]

0 comments on commit b5da6d1

Please sign in to comment.