Espressif provides a C-based development framework called ESP-IDF. It has, or will have, support for all Espressif chips starting with the ESP32, note that this framework doesn't support the ESP8266.
ESP-IDF, in turn, provides a newlib environment with enough functionality to build the Rust standard library (
std) on top of it. This is the approach that is being taken to enable
std support on Epressif devices.
The Espressif products supported for Rust
std development are the ones supported by the ESP-IDF framework. For details on different versions of ESP-IDF and support of Espressif chips, see this table.
std, you have access to a lot of features that exist in ESP-IDF, including threads, mutexes and other synchronization primitives, collections, random number generation, sockets, etc.
|Abstraction traits for embedded services (|
|An implementation of embedded-svc using |
|An implementation of the |
|Rust bindings to the |
The aforementioned crates have interdependencies, and this relationship can be seen below.
graph TD; esp-idf-hal --> esp-idf-sys & embedded-svc esp-idf-svc --> esp-idf-sys & esp-idf-hal & embedded-svc
- Rich functionality: If your embedded system requires lots of functionality like support for networking protocols, file I/O, or complex data structures, you will likely want to use hosted-environment approach because
stdlibraries provide a wide range of functionality that can be used to build complex applications.
- Portability: The
stdcrate provides a standardized set of APIs that can be used across different platforms and architectures, making it easier to write code that is portable and reusable.
- Rapid development: The
stdcrate provides a rich set of functionality that can be used to build applications quickly and efficiently, without worrying, too much, about low-level details.