-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
161 lines (146 loc) · 4.71 KB
/
Copy pathCargo.toml
File metadata and controls
161 lines (146 loc) · 4.71 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
[package]
name = "dlr-pst-sim"
version = "1.0.0-beta"
edition = "2024"
rust-version = "1.93.0"
[lints.clippy]
missing_docs_in_private_items = "warn"
[lints.rust]
missing_docs = "warn"
[features]
default = []
integration-test = []
[dependencies]
defmt = { version = "1.0.1", optional = true }
esp-hal = { version = "=1.0.0-rc.0", features = [
"defmt",
"esp32c3",
"unstable",
], optional = true }
embassy-time = { version = "0.4.0", features = ["defmt"], optional = true }
esp-hal-embassy = { version = "0.9.1", features = ["defmt", "esp32c3"], optional = true }
rtt-target = { version = "0.6.1", features = ["defmt"], optional = true }
esp-alloc = { version = "0.8.0", features = ["defmt"], optional = true }
embassy-executor = { version = "0.7.0", features = [
"defmt",
], optional = true }
embassy-net = { version = "0.6.0", features = [
"defmt",
"dhcpv4",
"dns",
"proto-ipv4",
"tcp",
"udp",
], optional = true }
esp-bootloader-esp-idf = { version = "0.2.0", features = ["esp32c3"], optional = true }
critical-section = { version = "1.2.0", optional = true }
esp-wifi = { version = "0.15.0", features = [
"builtin-scheduler",
"defmt",
"esp-alloc",
"esp32c3",
"smoltcp",
"wifi",
], optional = true }
smoltcp = { version = "0.12.0", default-features = false, features = [
"defmt",
"medium-ethernet",
"multicast",
"proto-dhcpv4",
"proto-dns",
"proto-ipv4",
"socket-dns",
"socket-icmp",
"socket-raw",
"socket-tcp",
"socket-udp",
], optional = true }
static_cell = { version = "2.1.1", optional = true }
shtcx = { version = "1.0.0", optional = true }
embedded-hal = { version = "1.0.0", optional = true }
rust-mqtt = { version = "0.3.0", default-features = false, features = ["no_std"], optional = true }
heapless = { version = "0.8", optional = true }
[build-dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
[target.'cfg(target_arch = "riscv32")'.dev-dependencies]
embedded-test = { version = "0.6.0", features = [
"defmt",
"embassy",
"external-executor",
] }
[target.'cfg(not(target_arch = "riscv32"))'.dev-dependencies]
testcontainers = "0.24"
rumqttc = "0.24"
tokio = { version = "1.42", features = ["full"] }
axum = "0.8"
[lib]
name = "dlr_pst_sim"
path = "src/app.rs"
[[bin]]
name = "dlr-pst-sim"
path = "src/main.rs"
test = false
required-features = [
"defmt",
"esp-hal",
"embassy-time",
"esp-hal-embassy",
"rtt-target",
"esp-alloc",
"embassy-executor",
"embassy-net",
"esp-bootloader-esp-idf",
"critical-section",
"esp-wifi",
"smoltcp",
"static_cell",
"rust-mqtt",
"heapless",
]
[[test]]
harness = false
name = "integration_test"
path = "tests/integration_test.rs"
required-features = [
"defmt",
"esp-hal",
"embassy-time",
"esp-hal-embassy",
"rtt-target",
"esp-alloc",
"embassy-executor",
"critical-section",
"shtcx",
"embedded-hal",
"esp-bootloader-esp-idf",
"integration-test",
]
[[test]]
name = "hil_test"
path = "tests/hil_test.rs"
[profile.dev]
opt-level = "s"
[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
lto = 'fat'
opt-level = 's'
overflow-checks = false
[package.metadata.commands]
depcheck = "cargo +nightly udeps"
format = "cargo fmt --all"
lint = "cargo clippy --lib --bins --all-features -- -D warnings"
typecheck = "cargo check --all-features"
audit-packages = "cargo audit --ignore RUSTSEC-2024-0436 --ignore RUSTSEC-2025-0111 --ignore RUSTSEC-2023-0089 --ignore RUSTSEC-2021-0127 --ignore RUSTSEC-2025-0134 --ignore RUSTSEC-2026-0049 --ignore RUSTSEC-2026-0098 --ignore RUSTSEC-2026-0099 --ignore RUSTSEC-2026-0104"
checks = "cargo cmd depcheck && cargo cmd format && cargo cmd lint && cargo cmd typecheck && cargo cmd audit-packages"
healthcheck = "probe-rs info --chip esp32c3"
unit = "cargo test --lib --target $(rustc -vV | sed -n 's|host: ||p') --no-default-features"
integration = "RUST_LOG=probe_rs=error cargo test --test integration_test --features defmt,esp-hal,embassy-time,esp-hal-embassy,rtt-target,esp-alloc,embassy-executor,critical-section,shtcx,embedded-hal,esp-bootloader-esp-idf,integration-test 2>&1 | grep -v -E '(^Frame |^ /home/)'"
hardware-in-loop = "cargo test --test hil_test --target $(rustc -vV | sed -n 's|host: ||p') -- --test-threads=1 --nocapture"
test = "cargo cmd unit && cargo cmd healthcheck && cargo cmd integration && cargo cmd hardware-in-loop"
cover = "cargo tarpaulin --skip-clean --lib --no-default-features --target $(rustc -vV | sed -n 's|host: ||p') --exclude-files=src/main.rs --target-dir=target/coverage"
review = "claude 'run code-reviewer agent against diff for simplicity and elegance'"
commit = "cargo cmd checks && cargo cmd test && cargo cmd review && git add -A && git cz && git push"