-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCargo.toml
More file actions
192 lines (160 loc) · 5.84 KB
/
Copy pathCargo.toml
File metadata and controls
192 lines (160 loc) · 5.84 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
[workspace]
members = ["rustot_derive"]
[package]
name = "rustot"
version = "0.5.0"
authors = ["Factbird team <support@factbird.com>"]
description = "AWS IoT"
readme = "README.md"
keywords = ["iot", "no-std"]
categories = ["embedded", "no-std"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/FactbirdHQ/rustot"
edition = "2024"
documentation = "https://docs.rs/rustot"
exclude = ["/documentation"]
[lib]
name = "rustot"
[badges]
maintenance = { status = "actively-developed" }
[dependencies]
bitmaps = { version = "3.1", default-features = false }
heapless = { version = "0.9.2", features = ["serde"] }
serde = { version = "1.0", default-features = false, features = ["derive"] }
minicbor = { version = "0.25", optional = true }
minicbor-serde = { version = "0.3.2", optional = true }
# Shadow storage dependencies
postcard = { git = "https://github.com/jamesmunns/postcard", rev = "f8a4064", default-features = false, features = [
"experimental-derive",
"heapless-v0_9",
] }
# KV-based shadow storage (optional, enabled by shadows_kv_persist feature)
sequential-storage = { version = "7.0", features = [
"heapless-09",
], optional = true }
serde-json-core = { version = "0.6" }
rustot-derive = { path = "rustot_derive", version = "0.2.1" }
embedded-storage-async = { version = "0.4", optional = true }
mqttrust = { git = "https://github.com/FactbirdHQ/mqttrust", rev = "6bc92de", optional = true }
embassy-time = { version = "0.5.0" }
embassy-sync = "0.8"
embassy-futures = "0.1.2"
log = { version = "0.4", default-features = false, optional = true }
defmt = { version = "1", optional = true }
bon = { version = "3.3.2", default-features = false }
# std feature dependencies (for FileKVStore)
tokio = { version = "1", features = ["fs", "io-util", "sync"], optional = true }
serde_json = { version = "1", optional = true }
base64 = { version = "0.22", optional = true }
# MQTT client implementations (optional, feature-gated)
rumqttc = { version = "0.24", optional = true }
greengrass-ipc-rust = { git = "https://github.com/FactbirdHQ/greengrass-ipc-rust", rev = "5fa3c8d", optional = true }
bytes = { version = "1", optional = true }
futures = { version = "0.3", optional = true }
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
], optional = true }
# Multi-shadow manager dependencies (optional, feature-gated)
aws-config = { version = "1.1.7", features = [
"behavior-version-latest",
], optional = true }
# default-features = false drops the `rustls` feature, which pulls the legacy
# hyper 0.14 / h2 0.3 stack (unfixable RUSTSEC-2026-0258) via aws-smithy-runtime/tls-rustls
aws-sdk-iotdataplane = { version = "1.72.0", default-features = false, features = [
"default-https-client",
"rt-tokio",
], optional = true }
uuid = { version = "1", features = ["v4"], optional = true }
[dev-dependencies]
native-tls = { version = "0.2" }
embedded-nal-async = "0.9"
env_logger = "0.11"
sha2 = "0.10.1"
static_cell = { version = "2", features = ["nightly"] }
log = { version = "0.4" }
serde_json = "1"
tokio = { version = "1.33", default-features = false, features = [
"macros",
"rt",
"net",
"time",
"io-std",
] }
tokio-native-tls = { version = "0.3.1" }
embassy-futures = { version = "0.1.2" }
embassy-time = { version = "0.5", features = ["log", "std", "generic-queue-8"] }
embedded-io-adapters = { version = "0.7.0", features = ["tokio-1"] }
ecdsa = { version = "0.16", features = ["pkcs8", "pem"] }
p256 = "0.13"
pkcs8 = { version = "0.10", features = ["encryption", "pem"] }
hex = { version = "0.4.3", features = ["alloc"] }
aws-config = "1"
aws-sdk-sts = "1"
aws-sdk-s3 = "1"
aws-sdk-iot = "1"
aws-credential-types = "1"
uuid = { version = "1", features = ["v4"] }
base64 = "0.22"
serial_test = "3"
rumqttc = { version = "0.24", features = ["use-native-tls"] }
reqwest = { version = "0.12", default-features = false, features = [
"rustls-tls",
] }
aws-sdk-iotjobsdataplane = "1"
minicbor = "0.25"
minicbor-serde = "0.3"
[features]
default = [
"transfer_mqtt",
"metric_cbor",
"provision_cbor",
"commands_cbor",
"shadows_kv_persist",
"mqtt_mqttrust",
]
metric_cbor = ["dep:minicbor", "dep:minicbor-serde"]
provision_cbor = ["dep:minicbor", "dep:minicbor-serde"]
commands_cbor = ["dep:minicbor", "dep:minicbor-serde"]
transfer_mqtt = ["dep:minicbor", "dep:minicbor-serde"]
transfer_http = []
transfer_http_reqwest = ["transfer_http", "std", "dep:reqwest"]
std = [
"serde/std",
"minicbor-serde?/std",
"dep:tokio",
"dep:serde_json",
"dep:base64",
"postcard/alloc",
"rustot-derive/std",
"embassy-time/std",
"embassy-time/generic-queue-8",
]
# Field-level KV shadow persistence traits (KVStore, KVPersist, FileKVStore with std)
shadows_kv_persist = ["rustot-derive/kv_persist", "postcard/heapless"]
# Flash-based KV store using sequential-storage (requires shadows_kv_persist)
sequential_storage = [
"shadows_kv_persist",
"dep:sequential-storage",
"dep:embedded-storage-async",
]
# Generates bon-based builder methods (desired(), reported()) on shadow structs.
# Downstream crates must also add `bon` as a direct dependency.
shadows_builders = ["rustot-derive/builders"]
defmt = ["dep:defmt", "heapless/defmt", "sequential-storage?/defmt"]
log = ["dep:log"]
# Multi-shadow manager (runtime-named shadows with wildcard subscriptions)
# Requires std for tokio, AWS SDK, etc.
shadows_multi = [
"std",
"dep:aws-config",
"dep:aws-sdk-iotdataplane",
"dep:uuid",
"tokio/time",
"rustot-derive/multi",
]
# MQTT client implementations (all optional, feature-gated)
mqtt_mqttrust = ["dep:mqttrust"]
mqtt_rumqttc = ["std", "dep:rumqttc", "tokio/time"]
mqtt_greengrass = ["std", "dep:greengrass-ipc-rust", "dep:bytes", "dep:futures", "tokio/time"]
[patch.crates-io]
serde-json-core = { git = "https://github.com/rust-embedded-community/serde-json-core", rev = "a435f78" }