From c20ac5ec71b56336bfcccd3d308b32643122f3c7 Mon Sep 17 00:00:00 2001 From: James Campbell Date: Mon, 30 Jan 2023 16:00:02 +0100 Subject: [PATCH] Convert `api` and `serialization` to features --- Cargo.toml | 2 +- tpke/Cargo.toml | 4 ++++ tpke/src/lib.rs | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 72edf305..797176b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,4 +23,4 @@ debug = true [profile.release] debug = true lto = true -codegen-units = 1 +codegen-units = 1 \ No newline at end of file diff --git a/tpke/Cargo.toml b/tpke/Cargo.toml index 247de9f3..dc0198d6 100644 --- a/tpke/Cargo.toml +++ b/tpke/Cargo.toml @@ -49,3 +49,7 @@ harness = false [profile.release] opt-level = 3 lto = true + +[features] +api = [] +serialization = [] \ No newline at end of file diff --git a/tpke/src/lib.rs b/tpke/src/lib.rs index 2e482500..50262f52 100644 --- a/tpke/src/lib.rs +++ b/tpke/src/lib.rs @@ -30,8 +30,10 @@ pub use decryption::*; pub use key_share::*; pub use refresh::*; -// TODO: Turn into a crate features +#[cfg(feature = "api")] pub mod api; + +#[cfg(feature = "serialization")] pub mod serialization; pub trait ThresholdEncryptionParameters {