Rust starter for ESP32 integrating Espressif’s ESP-IDF with the esp-rs ecosystem.
This project was originally generated from esp-rs/esp-idf-template.
- Abstractions for ESP32 peripherals
- Optional modules: display, graphics
- Examples:
hello_app,led_blinking_app,graphics_app, etc. - Integration with Cargo,
esp-idf-sys,esp-idf-hal
- Podman (or Docker)
- Rust toolchain (stable)
- ESP32 toolchain
podman build -t rust-esp-env .
podman run --rm -it \
-v "$(pwd)":/workspace:Z \
-w /workspace \
rust-esp-envInside the container, /workspace is your project root. Run commands like cargo build and cargo espflash, then exit.
-
Clone the repository
git clone https://github.com/stewlab/rust-esp-starter.git cd rust-esp-starter -
(Optional) Build and launch the development container
# Build the container image (run once, unless Containerfile changes) podman build -t rust-esp-env . # Start a dev container podman run --rm -it \ -v "$(pwd)":/workspace:Z \ -w /workspace \ rust-esp-env
Inside the container,
/workspaceis your project root. -
Build the project
cargo build
-
Configure (optional)
- Customize
sdkconfig.defaultsfor your board
- Customize
-
Flash & Monitor:
cargo espflash flash -p /dev/ttyUSB0 espflash monitor
Press Ctrl+R to reset the device.
-
By default,
hello_appruns. To use another example, editsrc/main.rs:fn main() { crate::apps::led_blinking_app::run().unwrap(); }
-
Enable features with Cargo:
cargo espflash --release --features "display-support graphics-support"
| Flag | Description |
|---|---|
display-support |
Display & backlight modules |
graphics-support |
Embedded‑graphics examples |
Contributions welcome:
- Fork the repo
- Create a branch
- Run
cargo fmt, add tests/docs - Open a PR to
main
- ESP32-2432S028 (AliExpress)
Tested on Ubuntu 24.04.2 via Podman
MIT License. See LICENSE.