-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCargo.toml
More file actions
292 lines (264 loc) · 12.5 KB
/
Copy pathCargo.toml
File metadata and controls
292 lines (264 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
[package]
name = "rs-matter-stack"
version = "0.2.0"
authors = ["ivmarkov <ivan.markov@gmail.com>"]
edition = "2021"
resolver = "2"
categories = ["embedded", "hardware-support"]
keywords = ["matter", "embedded"]
description = "Utility for configuring and running rs-matter"
repository = "https://github.com/sysgrok/rs-matter-stack"
license = "MIT OR Apache-2.0"
readme = "README.md"
rust-version = "1.87"
[patch.crates-io]
rs-matter = { git = "https://github.com/project-chip/rs-matter" }
#rs-matter = { path = "../rs-matter/rs-matter" }
[profile.dev]
debug = true
opt-level = "z"
[profile.release]
opt-level = "z"
debug = 0
debug-assertions = false
codegen-units = 1 # LLVM can perform better optimizations using a single thread
lto = "fat"
incremental = false
overflow-checks = false
[features]
default = []
# Sizing
# Number of subscriptions.
max-subscriptions-32 = []
max-subscriptions-16 = []
max-subscriptions-8 = []
max-subscriptions-7 = []
max-subscriptions-6 = []
max-subscriptions-5 = []
max-subscriptions-4 = []
# Default number of subscriptions.
max-subscriptions-3 = []
max-subscriptions-2 = []
max-subscriptions-1 = []
# Events ring-bffers' size.
events-ringbuf-size-0 = []
events-ringbuf-size-64 = []
events-ringbuf-size-128 = []
# Default events ring-buffers' size.
events-ringbuf-size-256 = []
events-ringbuf-size-512 = []
events-ringbuf-size-1024 = []
events-ringbuf-size-2048 = []
# Number of packet buffers.
max-im-buffers-64 = []
max-im-buffers-32 = []
max-im-buffers-16 = []
# Default number of packet buffers.
max-im-buffers-10 = []
max-im-buffers-9 = []
max-im-buffers-8 = []
max-im-buffers-7 = []
max-im-buffers-6 = []
max-im-buffers-5 = []
max-im-buffers-4 = []
# Number of responders.
max-responders-32 = []
max-responders-16 = []
max-responders-8 = []
max-responders-7 = []
max-responders-6 = []
max-responders-5 = []
# Default number of responders.
max-responders-4 = []
max-responders-3 = []
max-responders-2 = []
max-responders-1 = []
# Sizing / rs-matter
# Number of fabrics.
max-fabrics-32 = ["rs-matter/max-fabrics-32"]
max-fabrics-16 = ["rs-matter/max-fabrics-16"]
max-fabrics-8 = ["rs-matter/max-fabrics-8"]
max-fabrics-7 = ["rs-matter/max-fabrics-7"]
max-fabrics-6 = ["rs-matter/max-fabrics-6"]
# Default number of fabrics (Matter requires a minimum of 5 fabrics).
max-fabrics-5 = ["rs-matter/max-fabrics-5"]
max-fabrics-4 = ["rs-matter/max-fabrics-4"]
max-fabrics-3 = ["rs-matter/max-fabrics-3"]
max-fabrics-2 = ["rs-matter/max-fabrics-2"]
max-fabrics-1 = ["rs-matter/max-fabrics-1"]
# Number of groups per fabrics.
max-groups-per-fabric-32 = ["rs-matter/max-groups-per-fabric-32"]
max-groups-per-fabric-16 = ["rs-matter/max-groups-per-fabric-16"]
max-groups-per-fabric-12 = ["rs-matter/max-groups-per-fabric-12"]
max-groups-per-fabric-8 = ["rs-matter/max-groups-per-fabric-8"]
max-groups-per-fabric-7 = ["rs-matter/max-groups-per-fabric-7"]
max-groups-per-fabric-6 = ["rs-matter/max-groups-per-fabric-6"]
max-groups-per-fabric-5 = ["rs-matter/max-groups-per-fabric-5"]
# Default number of groups per fabric (Matter requires a minimum of 4 group table entries per fabric).
max-groups-per-fabric-4 = ["rs-matter/max-groups-per-fabric-4"]
# Number of group keys per fabric.
max-group-keys-per-fabric-5 = ["rs-matter/max-group-keys-per-fabric-5"]
max-group-keys-per-fabric-4 = ["rs-matter/max-group-keys-per-fabric-4"]
# Default number of group keys per fabric (Matter requires a minimum of 1 group keys per fabric).
max-group-keys-per-fabric-3 = ["rs-matter/max-group-keys-per-fabric-3"]
max-group-keys-per-fabric-2 = ["rs-matter/max-group-keys-per-fabric-2"]
# Number of endpoints that can be members of a group (per fabric).
max-group-endpoints-per-fabric-5 = ["rs-matter/max-group-endpoints-per-fabric-5"]
max-group-endpoints-per-fabric-4 = ["rs-matter/max-group-endpoints-per-fabric-4"]
# Default number of endpoints that can be members of a group (per fabric).
max-group-endpoints-per-fabric-3 = ["rs-matter/max-group-endpoints-per-fabric-3"]
max-group-endpoints-per-fabric-2 = ["rs-matter/max-group-endpoints-per-fabric-2"]
max-group-endpoints-per-fabric-1 = ["rs-matter/max-group-endpoints-per-fabric-1"]
# Number of ACL entries per fabric.
max-acls-per-fabric-32 = ["rs-matter/max-acls-per-fabric-32"]
max-acls-per-fabric-16 = ["rs-matter/max-acls-per-fabric-16"]
max-acls-per-fabric-8 = ["rs-matter/max-acls-per-fabric-8"]
max-acls-per-fabric-7 = ["rs-matter/max-acls-per-fabric-7"]
max-acls-per-fabric-6 = ["rs-matter/max-acls-per-fabric-6"]
max-acls-per-fabric-5 = ["rs-matter/max-acls-per-fabric-5"]
# Default number of ACL entries per fabric (Matter requires a minimum of 3 ACL entries per fabric).
max-acls-per-fabric-4 = ["rs-matter/max-acls-per-fabric-4"]
max-acls-per-fabric-3 = ["rs-matter/max-acls-per-fabric-3"]
max-acls-per-fabric-2 = ["rs-matter/max-acls-per-fabric-2"]
max-acls-per-fabric-1 = ["rs-matter/max-acls-per-fabric-1"]
# Number of subjects per ACL entry.
max-subjects-per-acl-32 = ["rs-matter/max-subjects-per-acl-32"]
max-subjects-per-acl-16 = ["rs-matter/max-subjects-per-acl-16"]
max-subjects-per-acl-8 = ["rs-matter/max-subjects-per-acl-8"]
max-subjects-per-acl-7 = ["rs-matter/max-subjects-per-acl-7"]
max-subjects-per-acl-6 = ["rs-matter/max-subjects-per-acl-6"]
max-subjects-per-acl-5 = ["rs-matter/max-subjects-per-acl-5"]
# Default number of subjects per ACL entry (Matter requires a minimum of 4 subjects per ACL entry).
max-subjects-per-acl-4 = ["rs-matter/max-subjects-per-acl-4"]
max-subjects-per-acl-3 = ["rs-matter/max-subjects-per-acl-3"]
max-subjects-per-acl-2 = ["rs-matter/max-subjects-per-acl-2"]
max-subjects-per-acl-1 = ["rs-matter/max-subjects-per-acl-1"]
# Number of targets per ACL entry.
max-targets-per-acl-32 = ["rs-matter/max-targets-per-acl-32"]
max-targets-per-acl-16 = ["rs-matter/max-targets-per-acl-16"]
max-targets-per-acl-8 = ["rs-matter/max-targets-per-acl-8"]
max-targets-per-acl-7 = ["rs-matter/max-targets-per-acl-7"]
max-targets-per-acl-6 = ["rs-matter/max-targets-per-acl-6"]
max-targets-per-acl-5 = ["rs-matter/max-targets-per-acl-5"]
max-targets-per-acl-4 = ["rs-matter/max-targets-per-acl-4"]
# Default number of targets per ACL entry (Matter requires a minimum of 3 targets per ACL entry).
max-targets-per-acl-3 = ["rs-matter/max-targets-per-acl-3"]
max-targets-per-acl-2 = ["rs-matter/max-targets-per-acl-2"]
max-targets-per-acl-1 = ["rs-matter/max-targets-per-acl-1"]
# Number of sessions.
max-sessions-64 = ["rs-matter/max-sessions-64"]
max-sessions-32 = ["rs-matter/max-sessions-32"]
# Default number of sessions (Matter requires a minimum of 3 sessions per fabric).
max-sessions-16 = ["rs-matter/max-sessions-16"]
max-sessions-8 = ["rs-matter/max-sessions-8"]
max-sessions-7 = ["rs-matter/max-sessions-7"]
max-sessions-6 = ["rs-matter/max-sessions-6"]
max-sessions-5 = ["rs-matter/max-sessions-5"]
max-sessions-4 = ["rs-matter/max-sessions-4"]
max-sessions-3 = ["rs-matter/max-sessions-3"]
# Number of exchanges per session.
max-exchanges-per-session-16 = ["rs-matter/max-exchanges-per-session-16"]
max-exchanges-per-session-8 = ["rs-matter/max-exchanges-per-session-8"]
max-exchanges-per-session-7 = ["rs-matter/max-exchanges-per-session-7"]
max-exchanges-per-session-6 = ["rs-matter/max-exchanges-per-session-6"]
# Default number of exchanges per session (Matter requires a minimum of 5 exchanges per session).
max-exchanges-per-session-5 = ["rs-matter/max-exchanges-per-session-5"]
max-exchanges-per-session-4 = ["rs-matter/max-exchanges-per-session-4"]
max-exchanges-per-session-3 = ["rs-matter/max-exchanges-per-session-3"]
# Size (in bytes) of the key-value persistence scratch buffer owned by `Matter`.
kv-blob-store-65536 = ["rs-matter/kv-blob-store-65536"]
kv-blob-store-32768 = ["rs-matter/kv-blob-store-32768"]
kv-blob-store-16384 = ["rs-matter/kv-blob-store-16384"]
kv-blob-store-8192 = ["rs-matter/kv-blob-store-8192"]
# Default key-value persistence scratch buffer size.
kv-blob-store-4096 = ["rs-matter/kv-blob-store-4096"]
kv-blob-store-2048 = ["rs-matter/kv-blob-store-2048"]
kv-blob-store-1024 = ["rs-matter/kv-blob-store-1024"]
# General
# Enable support for `log` logging (for embedded and OS targets).
log = ["dep:log", "rs-matter/log", "edge-mdns?/log"]
# Enable support for `defmt` logging (for embedded targets).
defmt = ["dep:defmt", "rs-matter/defmt", "heapless/defmt", "edge-mdns?/defmt"]
# Build `rs-matter` with support for work-stealing executors, like the default Tokio executor.
# This is a WIP feature and not yet fully supported.
sync-mutex = ["rs-matter/sync-mutex"]
# Enable the zBus proxies for a range of Linux dBus services used by `rs-matter` (off by default due to slow compilation).
zbus = ["rs-matter/zbus"]
# mDNS support for Linux and Windows (via Avahi or Bonjour).
# Prefer the Avahi and Resolved mDNS implementations over Zeroconf for production deployments, via `zbus`.
zeroconf = ["os", "rs-matter/zeroconf"]
# mDNS support for MacOSX.
astro-dnssd = ["os", "rs-matter/astro-dnssd"]
# BLE suppport for Linux (via BlueZ).
# Prefer the BlueZ implementation over Bluer for production deployments, via `zbus`.
bluer = ["rs-matter/bluer"]
# Crypto backend: Rust Crypto.
rustcrypto = ["rs-matter/rustcrypto"]
# Crypto backend: mbedTLS.
mbedtls = ["rs-matter/mbedtls"]
# Crypto backend: OpenSSL (not usable for baremetal targets, only for OS targets with OpenSSL installed).
openssl = ["rs-matter/openssl"]
# Umbrella set of features for typical OS-based non-baremetal deployments.
os = ["backtrace", "rs-matter/os", "rustcrypto", "embassy-time/std"]
# Enable backtrace capturing (useful for debugging).
backtrace = ["std", "rs-matter/backtrace"]
# Use the `async-io-mini` Reactor rather than `async-io` (useful for embedded Rust STD targets like ESP-IDF).
async-io-mini = ["std", "edge-nal-std/async-io-mini"]
# Minimal set of features for targets with support for Rust STD (narrower than `os` above).
std = ["alloc", "rs-matter/std", "edge-nal-std"]
# Enable the alloc feature for targets that support it.
# In general, `rs-matter` does not use heap, so this feature enables only a few convenience features.
alloc = ["rs-matter/alloc"]
# Typically enabled when TCP is used.
# When enabled, this feature extends the Transport layer packet buffers, as well as the ones
# served by `MatterBuffers` to 1MB (from 1500 B).
large-buffers = ["rs-matter/large-buffers"]
# Multicast groups support.
groups = ["rs-matter/groups"]
# Persist accepted subscriptions and resume them across a reboot.
persistent-subscriptions = ["rs-matter/persistent-subscriptions"]
# CASE session resumption (Sigma2-Resume fast-path + its persisted cache).
# When off, CASE always runs the full Sigma1/2/3 handshake, which is spec-compliant (resumption is optional) and drops the resume crypto + cache from the build.
case-resumption = ["rs-matter/case-resumption"]
# Never initiate a new CASE session: `Exchange::initiate` only reuses an existing session (else fails), so the linker drops the CASE initiator + mDNS resolver.
# Suits a pure accessory that only reports over sessions its peers established.
case-responder-only = ["rs-matter/case-responder-only"]
# Enable all features necessary by the examples in this crate.
examples = ["log", "os", "nix", "embassy-time-queue-utils/generic-queue-64", "zeroconf", "bluer"]
[dependencies]
cfg-if = "1"
log = { version = "0.4", default-features = false, optional = true }
defmt = { version = "1", default-features = false, optional = true, features = ["ip_in_core"] }
heapless = "0.9"
enumset = { version = "1", default-features = false }
bitflags = { version = "2.5", default-features = false }
scopeguard = { version = "1", default-features = false }
embassy-futures = "0.1"
embassy-sync = "0.8"
embassy-time = "0.5"
rs-matter = { version = "0.3", default-features = false }
edge-nal = "0.7"
edge-nal-std = { version = "0.7", optional = true }
edge-mdns = { version = "0.8", optional = true }
rand_core = "0.10"
# TEMPORARY: only for `rand::RngAdaptor`, which bridges `rand_core` 0.9 and 0.10 in both directions (0.9-only TRNGs like `embassy-rp` 0.10; 0.9-only consumers like `nrf-sdc`); remove once those crates implement `rand_core` 0.10
rand_core09 = { package = "rand_core", version = "0.9" }
rand_chacha = { version = "0.10", default-features = false }
[target.'cfg(all(unix, not(target_os = "espidf")))'.dependencies]
bitflags = "2"
nix = { version = "0.31", features = ["net"], optional = true }
[dev-dependencies]
static_cell = "2.1"
futures-lite = "2"
async-compat = "0.2"
env_logger = "0.11"
embassy-time-queue-utils = { version = "0.3", features = ["generic-queue-64"] }
rand = { version = "0.10", features = ["std", "std_rng", "sys_rng"] }
[[example]]
name = "light_eth"
path = "examples/light_eth.rs"
required-features = ["examples"]
[[example]]
name = "light"
path = "examples/light.rs"
required-features = ["examples"]