Skip to content

Commit

Permalink
use feature flags
Browse files Browse the repository at this point in the history
so we can use workspacing
  • Loading branch information
DougAnderson444 committed Feb 13, 2024
1 parent 44c66ea commit 96668c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/delano-events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ edition = "2021"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
delanocreds = { path = "../delanocreds" }
delano-keys = { path = "../delano-keys" }
delano-keys = { path = "../delano-keys", features = ["publish"] }
8 changes: 4 additions & 4 deletions crates/delano-keys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ edition = "2021"
crate-type = ["cdylib", "lib"]

[dependencies]
blastkids = { workspace = true }
bls12_381_plus = { workspace = true, features = ["alloc"] }
bincode = "1.3.3"
blastkids = { workspace = true, optional = true }
bls12_381_plus = { workspace = true, features = ["alloc"], optional = true }
cid = "0.10.1"
secrecy = "0.8.0"
serde = { version = "1.0.130", features = ["derive"], optional = true }
Expand All @@ -19,4 +18,5 @@ getrandom = "0.2"
# serde default feature
[features]
default = ["serde"]

deterministic = ["blastkids", "bls12_381_plus", "serde"]
vk = ["blastkids", "bls12_381_plus", "serde"]
8 changes: 6 additions & 2 deletions crates/delano-keys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#![doc = include_str!("../README.md")]

/// The Verification Key Module
/// Requires `vk` feature
#[cfg(feature = "vk")]
pub mod vk;

// only if feature derive is enabled
// #[cfg(feature = "derive")]
/// Requires `deterministic` feature
#[cfg(feature = "deterministic")]
pub mod kdf;

/// Requires `publish` feature
#[cfg(feature = "publish")]
pub mod publish;

// Test the README.md code snippets
Expand Down
2 changes: 1 addition & 1 deletion crates/delanocreds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ crate-type = ["cdylib", "lib"]

[dependencies]
bls12_381_plus = { workspace = true }
delano-keys = { workspace = true, features = ["serde"] }
delano-keys = { workspace = true, features = ["serde", "vk"] }
anyhow = "1.0.70"
cid = "0.10.1"
secrecy = "0.8.0"
Expand Down

0 comments on commit 96668c5

Please sign in to comment.