From 93f316c32e8f1f617ded5c1182ad53ba4b7434d6 Mon Sep 17 00:00:00 2001 From: Juan Couste Date: Sat, 21 Dec 2024 05:35:47 -0300 Subject: [PATCH 1/2] Add feature gate for embassy-time --- edge-dhcp/Cargo.toml | 5 +++-- edge-dhcp/src/lib.rs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/edge-dhcp/Cargo.toml b/edge-dhcp/Cargo.toml index 511588f..0d96777 100644 --- a/edge-dhcp/Cargo.toml +++ b/edge-dhcp/Cargo.toml @@ -17,14 +17,15 @@ categories = [ [features] default = ["io"] std = ["io"] -io = ["embassy-futures", "edge-nal"] +io = ["embassy-futures", "edge-nal", "time"] +time = ["embassy-time"] [dependencies] heapless = { workspace = true } log = { workspace = true } rand_core = "0.6" embassy-futures = { workspace = true, optional = true } -embassy-time = { workspace = true, default-features = false } # TODO: Make optional +embassy-time = { workspace = true, optional = true, default-features = false } edge-nal = { workspace = true, optional = true } num_enum = { version = "0.7", default-features = false } edge-raw = { workspace = true, default-features = false } diff --git a/edge-dhcp/src/lib.rs b/edge-dhcp/src/lib.rs index 23538f5..105fbfa 100644 --- a/edge-dhcp/src/lib.rs +++ b/edge-dhcp/src/lib.rs @@ -12,6 +12,7 @@ use num_enum::TryFromPrimitive; use edge_raw::bytes::{self, BytesIn, BytesOut}; pub mod client; +#[cfg(feature = "time")] pub mod server; #[cfg(feature = "io")] From 05a8a14df47af65e95ad65c52fb39aaa5f001649 Mon Sep 17 00:00:00 2001 From: Juan Couste Date: Sat, 21 Dec 2024 09:13:20 -0300 Subject: [PATCH 2/2] Changed remove embassy-time from std feature --- edge-dhcp/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edge-dhcp/Cargo.toml b/edge-dhcp/Cargo.toml index 0d96777..47a82e8 100644 --- a/edge-dhcp/Cargo.toml +++ b/edge-dhcp/Cargo.toml @@ -15,10 +15,10 @@ categories = [ ] [features] -default = ["io"] -std = ["io"] +default = ["io", "std"] io = ["embassy-futures", "edge-nal", "time"] time = ["embassy-time"] +std = [] [dependencies] heapless = { workspace = true }