Embassy brings Rust's async/await model to microcontrollers. Instead of writing state machines by hand or using RTIC's interrupt-driven model, you write async fn tasks that look like sequential code but compile down to zero-cost state machines.
The executor is bare-metal: no OS scheduler, no heap required for task storage (tasks have static storage if sizes are known at compile time). Wakers are implemented using atomic flags.
#[embassy_executor::task]
async fn sensor_task(mut adc: Adc<'static, ADC1>) {
loop {
let reading = adc.read().await;
process(reading);
Timer::after(Duration::from_millis(10)).await;
}
}The .await points are where the executor can switch to another task. Between awaits, the task runs to completion — cooperative multitasking without a preemptive scheduler.
Used in AeroStream Async for the event-driven telemetry pipeline on ESP32-C3. The RISC-V target required using esp-hal together with embassy's executor and timer abstractions.
The important mental model: embassy async is not the same as Tokio async. There is no thread pool. There is no blocking/non-blocking distinction at the OS level — there is no OS. Everything is interrupt-driven under the hood.