From 1af385b390479f9be4988cfc8df1c1a9fdf524f2 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Wed, 15 Jan 2025 19:46:05 +0000 Subject: [PATCH 1/3] Update the embassy-time dep to 0.4 --- rs-matter/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rs-matter/Cargo.toml b/rs-matter/Cargo.toml index bfc35d11..d6cdd6e2 100644 --- a/rs-matter/Cargo.toml +++ b/rs-matter/Cargo.toml @@ -39,7 +39,7 @@ owo-colors = "4" time = { version = "0.3", default-features = false } verhoeff = { version = "1", default-features = false } embassy-futures = "0.1" -embassy-time = "0.3" +embassy-time = "0.4" embassy-sync = "0.6" critical-section = "1.1" domain = { version = "0.10", default-features = false, features = ["heapless"] } From bd3fef9cc9a34231d09bf2d7ecadbcf0fbffc3dd Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Wed, 15 Jan 2025 20:10:46 +0000 Subject: [PATCH 2/3] Update embassy-time to V0.4 --- README.md | 8 +++++++- rs-matter/Cargo.toml | 12 +++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c1a02a73..88641276 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,13 @@ $ cargo build ### Building and running the example (Linux, MacOS X) ``` -$ cargo run --example onoff_light --features async-io +$ cargo run --example onoff_light --features examples +``` + +### Building and running the BLE example (Linux, MacOS X) + +``` +$ cargo run --example onoff_light_bt --features examples ``` ## Test diff --git a/rs-matter/Cargo.toml b/rs-matter/Cargo.toml index d6cdd6e2..347bd44f 100644 --- a/rs-matter/Cargo.toml +++ b/rs-matter/Cargo.toml @@ -9,12 +9,13 @@ readme = "README.md" keywords = ["matter", "smart", "smart-home", "IoT", "ESP32"] categories = ["embedded", "network-programming"] license = "Apache-2.0" -rust-version = "1.78" +rust-version = "1.83" [features] default = ["os", "rustcrypto"] #default = ["os", "mbedtls"] mbedtls is broken since several months - check the root cause -os = ["std", "backtrace", "critical-section/std", "embassy-sync/std", "embassy-time/std", "embassy-time/generic-queue"] +examples = ["std", "async-io", "async-compat", "embassy-time-queue-utils/generic-queue-64"] +os = ["std", "backtrace", "critical-section/std", "embassy-sync/std", "embassy-time/std"] std = ["alloc", "rand"] backtrace = [] alloc = [] @@ -40,6 +41,7 @@ time = { version = "0.3", default-features = false } verhoeff = { version = "1", default-features = false } embassy-futures = "0.1" embassy-time = "0.4" +embassy-time-queue-utils = "0.1" embassy-sync = "0.6" critical-section = "1.1" domain = { version = "0.10", default-features = false, features = ["heapless"] } @@ -91,14 +93,14 @@ similar = "2.6" [[example]] name = "onoff_light" path = "../examples/onoff_light/src/main.rs" -required-features = ["std", "async-io"] +required-features = ["examples"] [[example]] name = "onoff_light_bt" path = "../examples/onoff_light_bt/src/main.rs" -required-features = ["std", "async-io", "async-compat"] +required-features = ["examples"] # [[example]] # name = "speaker" # path = "../examples/speaker/src/main.rs" -# required-features = ["std", "async-io"] +# required-features = ["examples"] From 7d721db9901bc78249c73d16f80dd12f6557f787 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Wed, 15 Jan 2025 20:37:40 +0000 Subject: [PATCH 3/3] Fix unit tests --- rs-matter/Cargo.toml | 1 + rs-matter/tests/common/e2e/im/echo_cluster.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/rs-matter/Cargo.toml b/rs-matter/Cargo.toml index 347bd44f..0ed68f87 100644 --- a/rs-matter/Cargo.toml +++ b/rs-matter/Cargo.toml @@ -89,6 +89,7 @@ futures-lite = "2" async-channel = "2" static_cell = "2" similar = "2.6" +embassy-time-queue-utils = { version = "0.1", features = ["generic-queue-64"] } [[example]] name = "onoff_light" diff --git a/rs-matter/tests/common/e2e/im/echo_cluster.rs b/rs-matter/tests/common/e2e/im/echo_cluster.rs index 17a96948..518307c6 100644 --- a/rs-matter/tests/common/e2e/im/echo_cluster.rs +++ b/rs-matter/tests/common/e2e/im/echo_cluster.rs @@ -119,6 +119,7 @@ impl TestChecker { } /// Get a handle to the globally unique mDNS instance + #[allow(static_mut_refs)] pub fn get() -> Result>, Error> { unsafe { INIT.call_once(|| {