Skip to content

Commit

Permalink
Update deps from mdns branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jun 24, 2024
1 parent dbd0874 commit ad73a88
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ rust-version = "1.78"
[patch.crates-io]
rs-matter = { git = "https://github.com/ivmarkov/rs-matter", branch = "wifi" }
#rs-matter = { path = "../rs-matter/rs-matter" }
edge-nal = { git = "https://github.com/ivmarkov/edge-net" }
edge-nal = { git = "https://github.com/ivmarkov/edge-net", branch = "mdns" }
#edge-nal = { path = "../edge-net/edge-nal" }
edge-nal-std = { git = "https://github.com/ivmarkov/edge-net" }
edge-nal-std = { git = "https://github.com/ivmarkov/edge-net", branch = "mdns" }
#edge-nal-std = { path = "../edge-net/edge-nal-std" }

[profile.release]
Expand Down Expand Up @@ -53,7 +53,7 @@ esp-idf-svc = { version = "0.49", default-features = false, features = ["alloc",
embedded-svc = { version = "0.28", default-features = false }
rs-matter = { version = "0.1", default-features = false, features = ["rustcrypto"] }
async-io = { version = "=2.0.0", default-features = false } # Workaround for https://github.com/smol-rs/async-lock/issues/84
rs-matter-stack = { git = "https://github.com/ivmarkov/rs-matter-stack", default-features = false, features = ["std"], optional = true }
rs-matter-stack = { git = "https://github.com/ivmarkov/rs-matter-stack", branch = "mdns", default-features = false, features = ["std"], optional = true }
edge-nal = "0.2"
edge-nal-std = { version = "0.2", default-features = false, optional = true }

Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use core::pin::pin;
use embassy_futures::select::select;
use embassy_time::{Duration, Timer};

use esp_idf_matter::{init_async_io, EspWifiBleMatterStack, EspKvBlobStore, EspPersist, EspModem};
use esp_idf_matter::{init_async_io, EspKvBlobStore, EspModem, EspPersist, EspWifiBleMatterStack};

use esp_idf_svc::eventloop::EspSystemEventLoop;
use esp_idf_svc::hal::peripherals::Peripherals;
Expand All @@ -52,6 +52,8 @@ use rs_matter::secure_channel::spake2p::VerifierData;
use rs_matter::utils::select::Coalesce;
use rs_matter::CommissioningData;

use rs_matter_stack::persist::DummyPersist;

use static_cell::ConstStaticCell;

#[path = "dev_att/dev_att.rs"]
Expand All @@ -66,7 +68,7 @@ fn main() -> Result<(), anyhow::Error> {
// confused by the low priority of the ESP IDF main task
// Also allocate a very large stack (for now) as `rs-matter` futures do occupy quite some space
let thread = std::thread::Builder::new()
.stack_size(65 * 1024)
.stack_size(70 * 1024)
.spawn(|| {
// Eagerly initialize `async-io` to minimize the risk of stack blowups later on
init_async_io()?;
Expand Down Expand Up @@ -133,7 +135,8 @@ async fn matter() -> Result<(), anyhow::Error> {
// The Matter stack needs a persister to store its state
// `EspPersist`+`EspKvBlobStore` saves to a user-supplied NVS partition
// under namespace `esp-idf-matter`
EspPersist::new_wifi_ble(EspKvBlobStore::new_default(nvs.clone())?, stack),
DummyPersist,
//EspPersist::new_wifi_ble(EspKvBlobStore::new_default(nvs.clone())?, stack),
// The Matter stack needs the BT/Wifi modem peripheral - and in general -
// the Bluetooth / Wifi connections will be managed by the Matter stack itself
// For finer-grained control, call `MatterStack::is_commissioned`,
Expand All @@ -146,6 +149,8 @@ async fn matter() -> Result<(), anyhow::Error> {
},
// Our `AsyncHandler` + `AsyncMetadata` impl
(NODE, handler),
// No user future to run
core::future::pending(),
));

// Just for demoing purposes:
Expand Down
2 changes: 2 additions & 0 deletions examples/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ async fn matter() -> Result<(), anyhow::Error> {
},
// Our `AsyncHandler` + `AsyncMetadata` impl
(NODE, handler),
// No user future to run
core::future::pending(),
));

// Just for demoing purposes:
Expand Down
2 changes: 2 additions & 0 deletions examples/light_eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ async fn matter() -> Result<(), anyhow::Error> {
},
// Our `AsyncHandler` + `AsyncMetadata` impl
(NODE, handler),
// No user future to run
core::future::pending(),
));

// Just for demoing purposes:
Expand Down

0 comments on commit ad73a88

Please sign in to comment.