/ firmware / Cargo.toml
Cargo.toml
  1  [package]
  2  edition = "2024"
  3  version = "0.1.0"
  4  name = "firmware"
  5  rust-version = "1.88"
  6  default-run = "microvisor"
  7  authors = ["Mumtahin Farabi"]
  8  # Every test must be declared explicitly with `harness = false` because
  9  # `#[embedded_test::tests]` generates its own entry point and we're
 10  # `#![no_std]` — the default cargo test harness tries to link `libtest`
 11  # which doesn't exist without std. Cargo has no way to set `harness`
 12  # globally, so autotests stays off and every new test file needs a
 13  # 4-line `[[test]]` block below.
 14  autotests = false
 15  
 16  [[bin]]
 17  test = false
 18  name = "microvisor"
 19  path = "src/bin/microvisor.rs"
 20  
 21  # ─── integration tests ──────────────────────────────────────────────────────
 22  # Auto-discovery disabled (see `autotests = false` above). Each new test
 23  # file needs a 4-line `[[test]]` entry here. The `harness = false` flag
 24  # is mandatory — it tells cargo not to inject a libtest-based main() so
 25  # `#[embedded_test::tests]` can generate its own.
 26  
 27  [[test]]
 28  harness = false
 29  name = "hello"
 30  path = "tests/hello.rs"
 31  
 32  # [[test]]
 33  # harness = false
 34  # name = "ntc_formula"
 35  # path = "tests/ntc_formula.rs"
 36  
 37  [[test]]
 38  harness = false
 39  name = "file_server"
 40  path = "tests/file_server.rs"
 41  
 42  # [[test]]
 43  # harness = false
 44  # name = "access_point_connect"
 45  # path = "tests/access_point_connect.rs"
 46  
 47  # [[test]]
 48  # harness = false
 49  # name = "sd_card_webpage"
 50  # path = "tests/sd_card_webpage.rs"
 51  
 52  [[test]]
 53  harness = false
 54  name = "i2c"
 55  path = "tests/i2c.rs"
 56  
 57  # [[test]]
 58  # harness = false
 59  # name = "ds3231"
 60  # path = "tests/ds3231.rs"
 61  
 62  [[test]]
 63  harness = false
 64  name = "eeprom"
 65  path = "tests/eeprom.rs"
 66  
 67  # [[test]]
 68  # harness = false
 69  # name = "scd30"
 70  # path = "tests/scd30.rs"
 71  
 72  # [[test]]
 73  # harness = false
 74  # name = "scd4x"
 75  # path = "tests/scd4x.rs"
 76  
 77  [[test]]
 78  harness = false
 79  name = "sd"
 80  path = "tests/sd.rs"
 81  
 82  [[test]]
 83  harness = false
 84  name = "spi"
 85  path = "tests/spi.rs"
 86  
 87  [[test]]
 88  harness = false
 89  name = "http_api"
 90  path = "tests/http_api.rs"
 91  
 92  [[test]]
 93  harness = false
 94  name = "ota"
 95  path = "tests/ota.rs"
 96  
 97  [[test]]
 98  harness = false
 99  name = "system"
100  path = "tests/system.rs"
101  
102  # [[test]]
103  # harness = false
104  # name = "wifi"
105  # path = "tests/wifi.rs"
106  
107  # [[test]]
108  # harness = false
109  # name = "sntp"
110  # path = "tests/sntp.rs"
111  
112  # [[test]]
113  # harness = false
114  # name = "websocket"
115  # path = "tests/websocket.rs"
116  
117  # ─── examples ────────────────────────────────────────────────────────────────
118  
119  # esp_hal_smartled + smart_leds deps commented out — re-enable when crates are updated for new esp-hal
120  # [[example]]
121  # test = false
122  # bench = false
123  # name = "neopixel"
124  # path = "examples/esp32s3/neopixel.rs"
125  
126  [[example]]
127  test = false
128  bench = false
129  name = "gpio"
130  path = "examples/esp32s3/gpio.rs"
131  
132  [[example]]
133  test = false
134  bench = false
135  name = "i2c"
136  path = "examples/esp32s3/i2c.rs"
137  
138  [[example]]
139  test = false
140  bench = false
141  name = "ch832x"
142  path = "examples/esp32s3/ch832x.rs"
143  
144  [[example]]
145  test = false
146  bench = false
147  name = "wifi_tcp"
148  path = "examples/esp32s3/wifi_tcp.rs"
149  
150  [[example]]
151  test = false
152  bench = false
153  name = "access_point"
154  path = "examples/esp32s3/access_point.rs"
155  
156  [[example]]
157  test = false
158  bench = false
159  name = "sdcard_read"
160  path = "examples/sdcard_read.rs"
161  
162  # [[example]]
163  # test = false
164  # bench = false
165  # name = "espota_server"
166  # path = "examples/esp32s3/espota_server.rs"
167  
168  [[example]]
169  test = false
170  bench = false
171  name = "modbus_sensors"
172  path = "examples/esp32s3/modbus_sensors.rs"
173  
174  [[example]]
175  test = false
176  bench = false
177  name = "deep_sleep"
178  path = "examples/esp32s3/deep_sleep.rs"
179  
180  [[example]]
181  test = false
182  bench = false
183  name = "defmt-tcp"
184  path = "examples/esp32s3/defmt-tcp.rs"
185  
186  [[example]]
187  test = false
188  bench = false
189  name = "http_hello"
190  path = "examples/esp32s3/http_hello.rs"
191  
192  [[example]]
193  test = false
194  bench = false
195  name = "playground"
196  path = "examples/esp32s3/playground.rs"
197  
198  [lib]
199  test = false
200  
201  # ─── dependencies ────────────────────────────────────────────────────────────
202  
203  [target.'cfg(target_arch = "xtensa")'.dependencies]
204  defmt.workspace = true
205  
206  [target.'cfg(target_arch = "xtensa")'.dev-dependencies]
207  embedded-test = { version = "0.7.1", features = [
208      "defmt",
209      "embassy-010",
210      "external-executor",
211      "xtensa-semihosting",
212  ] }
213  
214  [target.xtensa-esp32s3-none-elf.dependencies]
215  # smart-leds             = "0.4.0"   # TODO: update esp-hal-smartled for new esp-hal API
216  # esp-hal-smartled       = "0.17.0"
217  embedded-hal = "1.0.0"
218  embedded-hal-bus = "0.3.0"
219  mipidsi = "0.10.0"
220  mousefood = { version = "0.5.0", default-features = false, features = [
221      "fonts",
222  ] }
223  ratatui = { version = "0.30.0", default-features = false, features = [
224      "all-widgets",
225  ] }
226  embedded-sdmmc = { git = "https://github.com/rust-embedded-community/embedded-sdmmc-rs", rev = "c7231ddb3dfe9a67c76f15d150d4b42a0d0c9f70", default-features = false, features = [
227      "defmt-log",
228  ] }
229  volatile = "0.4.3"
230  static_cell = "2.1.1"
231  critical-section = "1.2.0"
232  embedded-io = { workspace = true, features = ["defmt"] }
233  embassy-time = { workspace = true, features = ["defmt"] }
234  embassy-executor = { workspace = true, features = ["defmt"] }
235  embedded-io-async = { workspace = true, features = ["defmt"] }
236  rtt-target = { version = "0.6.2", features = ["defmt"] }
237  
238  esp-alloc = { git = "https://github.com/esp-rs/esp-hal", rev = "c670420d", features = [
239      "defmt",
240  ] }
241  panic-rtt-target = { version = "0.2.0", features = ["defmt"] }
242  esp-bootloader-esp-idf = { git = "https://github.com/esp-rs/esp-hal", rev = "c670420d", features = [
243      "defmt",
244      "esp32s3",
245  ] }
246  esp-storage = { git = "https://github.com/esp-rs/esp-hal", rev = "c670420d", features = [
247      "esp32s3",
248  ] }
249  esp-hal = { git = "https://github.com/esp-rs/esp-hal", rev = "c670420d", features = [
250      "defmt",
251      "esp32s3",
252      "unstable",
253  ] }
254  embassy-futures = "0.1"
255  embassy-sync = { version = "0.7", features = ["defmt"] }
256  trouble-host = { version = "0.6.0", features = ["gatt"] }
257  bt-hci = "0.8.0"
258  chacha20 = { version = "0.9", default-features = false }
259  constant_time_eq = { version = "0.3", default-features = false }
260  poly1305 = { version = "0.8", default-features = false }
261  sha2 = { version = "0.10", default-features = false }
262  x25519-dalek = { version = "2.0", default-features = false }
263  ed25519-dalek = { version = "2.1", default-features = false }
264  rand = { version = "0.8", default-features = false }
265  embassy-net = { version = "0.9.0", features = [
266      "tcp",
267      "udp",
268      "defmt",
269      "dhcpv4",
270      "dns",
271      "medium-ethernet",
272      "icmp",
273      "multicast",
274      "auto-icmp-echo-reply",
275  ] }
276  esp-rtos = { git = "https://github.com/esp-rs/esp-hal", rev = "c670420d", features = [
277      "defmt",
278      "embassy",
279      "esp32s3",
280      "esp-alloc",
281      "esp-radio",
282  ] }
283  esp-radio = { git = "https://github.com/esp-rs/esp-hal", rev = "c670420d", features = [
284      "ble",
285      "coex",
286      "wifi",
287      "defmt",
288      "esp32s3",
289      "unstable",
290      "esp-alloc",
291  ] }
292  picoserve = { git = "https://github.com/sammhicks/picoserve", rev = "815ca5b", features = [
293      "embassy",
294      "json",
295  ] }
296  serde-json-core = { version = "0.6.0", default-features = false }
297  heapless = { version = "0.8", default-features = false, features = ["serde"] }
298  embedded-storage = "0.3.1"
299  async-modbus = { version = "0.7.0", default-features = false, features = [
300      "embedded-io",
301  ] }
302  cat24c32-rs = { git = "https://github.com/PixmaNts/cat24c32-rs", rev = "397187c" }
303  ds323x = { version = "0.7.0", features = ["defmt"] }
304  scd4x = { version = "0.5.0", default-features = false, features = [
305      "embedded-hal-async",
306  ] }
307  scd30-interface = { version = "2.0.0", default-features = false, features = [
308      "async",
309      "defmt",
310  ] }
311  sntpc = { version = "0.8", default-features = false }
312  libm = "0.2.16"
313  serde = { version = "1", default-features = false, features = ["derive"] }
314  
315  # Not imported directly — enables features for embassy-net's transitive smoltcp dep.
316  smoltcp = { version = "0.13.0", default-features = false, features = [
317      "defmt",
318      "multicast",
319      "proto-dns",
320      "proto-ipv4",
321      "socket-dns",
322      "socket-raw",
323      "socket-tcp",
324      "socket-udp",
325      "socket-icmp",
326      "proto-dhcpv4",
327      "medium-ethernet",
328  ] }