From 96668c561333096ebfefa16c1020c9b5b04aeb41 Mon Sep 17 00:00:00 2001 From: Doug Anderson444 Date: Tue, 13 Feb 2024 07:52:00 -0400 Subject: [PATCH] use feature flags so we can use workspacing --- crates/delano-events/Cargo.toml | 2 +- crates/delano-keys/Cargo.toml | 8 ++++---- crates/delano-keys/src/lib.rs | 8 ++++++-- crates/delanocreds/Cargo.toml | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/crates/delano-events/Cargo.toml b/crates/delano-events/Cargo.toml index 6d72efb..9114ef0 100644 --- a/crates/delano-events/Cargo.toml +++ b/crates/delano-events/Cargo.toml @@ -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"] } diff --git a/crates/delano-keys/Cargo.toml b/crates/delano-keys/Cargo.toml index d326bdf..cc25d00 100644 --- a/crates/delano-keys/Cargo.toml +++ b/crates/delano-keys/Cargo.toml @@ -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 } @@ -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"] diff --git a/crates/delano-keys/src/lib.rs b/crates/delano-keys/src/lib.rs index be2722d..ca3817f 100644 --- a/crates/delano-keys/src/lib.rs +++ b/crates/delano-keys/src/lib.rs @@ -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 diff --git a/crates/delanocreds/Cargo.toml b/crates/delanocreds/Cargo.toml index d2a830d..0223482 100644 --- a/crates/delanocreds/Cargo.toml +++ b/crates/delanocreds/Cargo.toml @@ -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"