rs_matter_node_core/lib.rs
1/*
2 *
3 * Copyright (c) 2026 Project CHIP Authors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18//! The state of a Matter node, as far as it does not depend on how the node
19//! talks to others: the fabrics, the ACL, the fail-safe, the basic information
20//! settings, the networks, the clock and the ICD advertisement.
21#![cfg_attr(not(feature = "std"), no_std)]
22#![allow(async_fn_in_trait)]
23#![allow(unknown_lints)]
24#![allow(clippy::uninlined_format_args)]
25#![recursion_limit = "1024"]
26// `cargo llvm-cov` sets `coverage_nightly` when it runs on a nightly toolchain;
27// the test modules are then excluded from the coverage report
28#![cfg_attr(all(coverage_nightly, test), feature(coverage_attribute))]
29
30#[cfg(feature = "alloc")]
31extern crate alloc;
32
33// This mod MUST go first, so that the others see its macros.
34pub(crate) mod fmt;
35
36pub mod acl;
37pub mod basic_info;
38pub mod fabric;
39pub mod failsafe;
40pub mod handover;
41pub mod icd;
42pub mod networks;
43pub mod rtc;
44pub mod session;
45pub mod test_device;
46
47// The dependencies, under the names the code uses for them
48use rs_matter_cert as cert;
49use rs_matter_cert::attest;
50use rs_matter_crypto as crypto;
51use rs_matter_crypto::group_keys;
52use rs_matter_dm_core as dm;
53use rs_matter_dm_core::persist;
54use rs_matter_im_core as im;
55use rs_matter_pairing as pairing;
56use rs_matter_tlv as tlv;
57use rs_matter_utils as utils;
58use rs_matter_utils::error;
59
60pub use crate::pairing::{BasicCommData, DevCommData, VerifierCommData};
61
62/// The Matter UDP port
63pub const MATTER_PORT: u16 = 5540;