The Embedded Rust Ecosystem

~10 min

What Is no_std?

When you write normal Rust, you have access to the standard library (std) — file I/O, networking, threads, heap allocation. On a microcontroller, most of that doesn't exist. There's no operating system, no filesystem, no heap (by default).

no_std means: we're opting out of the standard library and working with just core — the subset of Rust that works everywhere, including bare-metal microcontrollers.

Every embedded Rust project starts with `#![no_std]` and `#![no_main]`. This tells the compiler: no standard library, no regular `main()` function. We'll set up our own entry point.

The Landscape

The embedded Rust ecosystem is organized around a few key GitHub organizations:

OrganizationWhat They Do
rust-embeddedCore embedded Rust infrastructure — embedded-hal traits, the Discovery book, cortex-m crates
esp-rsEverything ESP32 — esp-hal, esp-radio, esp-alloc, tooling
embassy-rsAsync embedded framework — Embassy executor, HAL integrations

For this workshop, we'll primarily work with esp-rs crates, since our hardware is the ESP32-C3.

Where to Find Things

What You NeedWhere to Look
Crate discoverycrates.io — search for driver crates, HALs
API documentationdocs.rs — auto-generated docs for every published crate
ESP32-C3 specific docsdocs.espressif.com/projects/rust/esp-hal/latest/esp32c3/esp_hal/
Examples & source codeGitHub repos — esp-rs/esp-hal, driver crate repos
Curated resourcesawesome-esp-rust
By default, `docs.rs` builds ESP-HAL documentation for the ESP32-C6. For **ESP32-C3 specific** documentation, use Espressif's hosted docs instead. The APIs are very similar, but chip-specific features may differ.

The Role of esp-hal

esp-hal is the Hardware Abstraction Layer for ESP32 chips. It provides:

  • Safe Rust APIs for every peripheral (GPIO, I2C, SPI, UART, timers, etc.)
  • Implementations of embedded-hal traits (more on this next)
  • Interrupt handling
  • DMA support

Think of esp-hal as the bridge between your Rust code and the raw hardware registers on the ESP32-C3.

Current version: esp-hal 1.0.0 (released October 2025).