Skip to content

Commit

Permalink
more feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Oct 15, 2023
1 parent 3c5319d commit 8e4fec9
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 10 deletions.
41 changes: 35 additions & 6 deletions src/collections/mod.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,60 @@
mod typed_usize;
pub use typed_usize::TypedUsize;

#[cfg(feature = "threshold")]
mod vecmap;
mod vecmap_iter;
mod vecmap_zip;
#[cfg(feature = "threshold")]
pub use vecmap::VecMap;

#[cfg(feature = "threshold")]
mod vecmap_iter;
#[cfg(feature = "threshold")]
pub use vecmap_iter::VecMapIter;

#[cfg(feature = "threshold")]
mod vecmap_zip;
#[cfg(feature = "threshold")]
pub use vecmap_zip::{zip2, zip3};

#[cfg(feature = "threshold")]
mod fillvecmap;
#[cfg(feature = "threshold")]
pub use fillvecmap::FillVecMap;

#[cfg(feature = "threshold")]
mod holevecmap;
mod holevecmap_iter;
#[cfg(feature = "threshold")]
pub use holevecmap::HoleVecMap;

#[cfg(feature = "threshold")]
mod holevecmap_iter;

#[cfg(feature = "threshold")]
mod fillholevecmap;
#[cfg(feature = "threshold")]
pub use fillholevecmap::FillHoleVecMap;

#[cfg(feature = "threshold")]
mod fillp2ps;
mod fullp2ps;
mod p2ps;
mod p2ps_iter;
#[cfg(feature = "threshold")]
pub use fillp2ps::FillP2ps;

#[cfg(feature = "threshold")]
mod fullp2ps;
#[cfg(feature = "threshold")]
pub use fullp2ps::FullP2ps;

#[cfg(feature = "threshold")]
mod p2ps;
#[cfg(feature = "threshold")]
pub use p2ps::P2ps;

#[cfg(feature = "threshold")]
mod p2ps_iter;
#[cfg(feature = "threshold")]
pub use p2ps_iter::P2psIter;

#[cfg(feature = "threshold")]
mod subset;
#[cfg(feature = "threshold")]
pub use subset::Subset;
2 changes: 1 addition & 1 deletion src/collections/typed_usize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl<'de, K> Deserialize<'de> for TypedUsize<K> {
#[cfg(test)]
mod tests {
use super::TypedUsize;
use crate::sdk::implementer_api::{deserialize, serialize};
use crate::sdk::wire_bytes::{deserialize, serialize};

struct TestMarker;

Expand Down
2 changes: 2 additions & 0 deletions src/crypto_tools/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#[cfg(feature = "threshold")]
pub mod constants;
#[cfg(feature = "threshold")]
pub mod hash;
#[cfg(feature = "secp256k1")]
pub mod k256_serde;
Expand Down
2 changes: 1 addition & 1 deletion src/ecdsa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const SIGN_TAG: u8 = 0x01;
#[cfg(test)]
mod tests {
use super::{keygen, sign, verify};
use crate::{crypto_tools::rng::dummy_secret_recovery_key, multisig::sign::MessageDigest};
use crate::crypto_tools::{message_digest::MessageDigest, rng::dummy_secret_recovery_key};
use std::convert::TryFrom;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/ed25519/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub struct Asn1Signature<'a> {
#[cfg(test)]
mod tests {
use super::{keygen, sign, verify};
use crate::{crypto_tools::rng::dummy_secret_recovery_key, multisig::sign::MessageDigest};
use crate::crypto_tools::{message_digest::MessageDigest, rng::dummy_secret_recovery_key};
use std::convert::TryFrom;

#[test]
Expand Down
4 changes: 3 additions & 1 deletion src/sdk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub(crate) mod implementer_api;

#[cfg(feature = "threshold")]
mod executer;
#[cfg(feature = "threshold")]
mod party_share_counts;
#[cfg(feature = "threshold")]
mod protocol;
Expand All @@ -16,4 +17,5 @@ mod protocol_builder;
mod protocol_info;
#[cfg(feature = "threshold")]
mod round;
mod wire_bytes;

pub(crate) mod wire_bytes;

0 comments on commit 8e4fec9

Please sign in to comment.