Skip to content

Commit

Permalink
Re-export rs-matter and rs-matter-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jan 18, 2025
1 parent e64fd8b commit e4f0e81
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ embassy-time = "0.4"
esp-idf-svc = { version = "0.51", default-features = false, features = ["alloc", "embassy-sync", "embassy-time-driver", "experimental"] }
embedded-svc = { version = "0.28", default-features = false }
rs-matter = { version = "0.1", default-features = false, features = ["rustcrypto"] }
rs-matter-stack = { git = "https://github.com/ivmarkov/rs-matter-stack", default-features = false, optional = true, 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, optional = true }
edge-nal = "0.5"
edge-nal-std = { version = "0.5", default-features = false, optional = true }

Expand Down
18 changes: 8 additions & 10 deletions examples/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ use core::pin::pin;
use embassy_futures::select::select;
use embassy_time::{Duration, Timer};

use esp_idf_matter::matter::data_model::cluster_basic_information::BasicInfoConfig;
use esp_idf_matter::matter::data_model::cluster_on_off;
use esp_idf_matter::matter::data_model::device_types::DEV_TYPE_ON_OFF_LIGHT;
use esp_idf_matter::matter::data_model::objects::{Dataver, Endpoint, HandlerCompat, Node};
use esp_idf_matter::matter::data_model::system_model::descriptor;
use esp_idf_matter::matter::utils::init::InitMaybeUninit;
use esp_idf_matter::matter::utils::select::Coalesce;
use esp_idf_matter::persist;
use esp_idf_matter::stack::test_device::{TEST_BASIC_COMM_DATA, TEST_DEV_ATT, TEST_PID, TEST_VID};
use esp_idf_matter::{init_async_io, EspMatterBle, EspMatterWifi, EspWifiNCMatterStack};

use esp_idf_svc::eventloop::EspSystemEventLoop;
Expand All @@ -27,16 +35,6 @@ use esp_idf_svc::timer::EspTaskTimerService;

use log::{error, info};

use rs_matter::data_model::cluster_basic_information::BasicInfoConfig;
use rs_matter::data_model::cluster_on_off;
use rs_matter::data_model::device_types::DEV_TYPE_ON_OFF_LIGHT;
use rs_matter::data_model::objects::{Dataver, Endpoint, HandlerCompat, Node};
use rs_matter::data_model::system_model::descriptor;
use rs_matter::utils::init::InitMaybeUninit;
use rs_matter::utils::select::Coalesce;

use rs_matter_stack::test_device::{TEST_BASIC_COMM_DATA, TEST_DEV_ATT, TEST_PID, TEST_VID};

use static_cell::StaticCell;

fn main() -> Result<(), anyhow::Error> {
Expand Down
18 changes: 8 additions & 10 deletions examples/light_eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ use core::pin::pin;
use embassy_futures::select::select;
use embassy_time::{Duration, Timer};

use esp_idf_matter::matter::data_model::cluster_basic_information::BasicInfoConfig;
use esp_idf_matter::matter::data_model::cluster_on_off;
use esp_idf_matter::matter::data_model::device_types::DEV_TYPE_ON_OFF_LIGHT;
use esp_idf_matter::matter::data_model::objects::{Dataver, Endpoint, HandlerCompat, Node};
use esp_idf_matter::matter::data_model::system_model::descriptor;
use esp_idf_matter::matter::utils::init::InitMaybeUninit;
use esp_idf_matter::matter::utils::select::Coalesce;
use esp_idf_matter::netif::EspMatterNetif;
use esp_idf_matter::persist;
use esp_idf_matter::stack::test_device::{TEST_BASIC_COMM_DATA, TEST_DEV_ATT, TEST_PID, TEST_VID};
use esp_idf_matter::{init_async_io, EspEthMatterStack};

use esp_idf_svc::eventloop::EspSystemEventLoop;
Expand All @@ -28,16 +36,6 @@ use esp_idf_svc::wifi::{self, AsyncWifi, EspWifi};

use log::{error, info};

use rs_matter::data_model::cluster_basic_information::BasicInfoConfig;
use rs_matter::data_model::cluster_on_off;
use rs_matter::data_model::device_types::DEV_TYPE_ON_OFF_LIGHT;
use rs_matter::data_model::objects::{Dataver, Endpoint, HandlerCompat, Node};
use rs_matter::data_model::system_model::descriptor;
use rs_matter::utils::init::InitMaybeUninit;
use rs_matter::utils::select::Coalesce;

use rs_matter_stack::test_device::{TEST_BASIC_COMM_DATA, TEST_DEV_ATT, TEST_PID, TEST_VID};

use static_cell::StaticCell;

const WIFI_SSID: &str = env!("WIFI_SSID");
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub mod ble;
pub mod error;
#[cfg(all(feature = "std", feature = "rs-matter-stack"))]
pub mod eth;
pub mod matter;
#[cfg(any(esp_idf_comp_mdns_enabled, esp_idf_comp_espressif__mdns_enabled))]
pub mod mdns;
#[cfg(all(
Expand All @@ -53,6 +54,8 @@ pub mod netif;
#[cfg(esp_idf_comp_nvs_flash_enabled)]
#[cfg(feature = "rs-matter-stack")]
pub mod persist;
#[cfg(feature = "rs-matter-stack")]
pub mod stack;
#[cfg(all(
not(esp32h2),
not(esp32s2),
Expand Down
2 changes: 2 additions & 0 deletions src/matter.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Re-export the `rs-matter` crate
pub use rs_matter::*;
2 changes: 2 additions & 0 deletions src/stack.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Re-export the `rs-matter-stack` crate
pub use rs_matter_stack::*;

0 comments on commit e4f0e81

Please sign in to comment.