|
1 | | -# Type-Safe Rust Wrappers for various ESP-IDF services |
| 1 | +# Safe Rust wrappers for the services in the [ESP IDF SDK](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/) |
2 | 2 |
|
3 | 3 | [](https://github.com/esp-rs/esp-idf-svc/actions/workflows/ci.yml) |
4 | | - |
| 4 | +[](https://crates.io/crates/esp-idf-svc) |
5 | 5 | [](https://esp-rs.github.io/esp-idf-svc/esp_idf_svc/index.html) |
6 | 6 | [](https://matrix.to/#/#esp-rs:matrix.org) |
| 7 | +[](https://wokwi.com/projects/332188235906155092) |
7 | 8 |
|
8 | | -This crate contains wrappers which are mostly implementations of the abstractions defined in the [embedded-svc](https://github.com/ivmarkov/embedded-svc) project. It has features such as wifi, networking, httpd, logging. |
| 9 | +## Highlights |
| 10 | + |
| 11 | +* Supports almost all ESP IDF services: timers, event loop, Wifi, Ethernet, HTTP client & server, MQTT, WS, NVS, OTA, etc. |
| 12 | +* Implements the traits of [embedded-svc](https://github.com/esp-rs/embedded-svc) |
| 13 | +* Blocking and `async` mode for each service (`async` support where feasible) |
| 14 | + |
| 15 | +**You might want to also check out the ESP IDF [Drivers](https://github.com/esp-rs/esp-idf-hal) wrappers, and the raw bindings to ESP IDF in the [esp-idf-sys](https://github.com/esp-rs/esp-idf-sys) crate!** |
| 16 | + |
| 17 | +## Build Prerequisites |
| 18 | + |
| 19 | +Follow the [Prerequisites](https://github.com/esp-rs/esp-idf-template#prerequisites) section in the `esp-idf-template` crate. |
| 20 | + |
| 21 | +## Examples |
| 22 | + |
| 23 | +The examples could be built and flashed conveniently with [`cargo-espflash`](https://github.com/esp-rs/espflash/). To run e.g. `wifi` on an e.g. ESP32-C3: |
| 24 | +(Swap the Rust target and example name with the target corresponding for your ESP32 MCU and with the example you would like to build) |
| 25 | + |
| 26 | +with cargo-esptool v1.7: |
| 27 | +``` |
| 28 | +$ ESP_IDF_VERSION=release/v4.4 cargo espflash --target riscv32imc-esp-espidf --example wifi --monitor /dev/ttyUSB0 |
| 29 | +``` |
| 30 | + |
| 31 | +with cargo-esptool v2.0: |
| 32 | +``` |
| 33 | +$ ESP_IDF_VERSION=release/v4.4 cargo espflash flash --target riscv32imc-esp-espidf --example wifi --monitor |
| 34 | +``` |
| 35 | + |
| 36 | +## Setting up a "Hello, world!" binary crate with ESP IDF |
| 37 | + |
| 38 | +Use the [esp-idf-template](https://github.com/esp-rs/esp-idf-template) project. Everything would be arranged and built for you automatically - no need to manually clone the ESP IDF repository. |
| 39 | + |
| 40 | +## More information |
9 | 41 |
|
10 | 42 | For more information, check out: |
11 | 43 | * The [Rust on ESP Book](https://esp-rs.github.io/book/) |
12 | | -* The [embedded-svc](https://github.com/esp-rs/embedded-svc) project |
| 44 | +* The [ESP Embedded Training](https://github.com/esp-rs/espressif-trainings) |
13 | 45 | * The [esp-idf-template](https://github.com/esp-rs/esp-idf-template) project |
14 | | -* The [esp-idf-sys](https://github.com/esp-rs/esp-idf-sys) project |
| 46 | +* The [embedded-svc](https://github.com/esp-rs/embedded-svc) project |
15 | 47 | * The [esp-idf-hal](https://github.com/esp-rs/esp-idf-hal) project |
| 48 | +* The [embedded-hal](https://github.com/rust-embedded/embedded-hal) project |
| 49 | +* The [esp-idf-sys](https://github.com/esp-rs/esp-idf-sys) project |
16 | 50 | * The [Rust for Xtensa toolchain](https://github.com/esp-rs/rust-build) |
17 | 51 | * The [Rust-with-STD demo](https://github.com/ivmarkov/rust-esp32-std-demo) project |
0 commit comments