embassy

Run async tasks on no_std embedded systems with Rust's async/await.

2|Updated Dec 2, 2025
One-click install
npx skills add https://github.com/njfdev/ncssm_hpr_2025_payload --skill embassy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: embassy
Source: https://github.com/njfdev/ncssm_hpr_2025_payload/tree/main/.claude/skills/embassy
Command: npx skills add https://github.com/njfdev/ncssm_hpr_2025_payload --skill embassy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Embassy helps solve the challenge of asynchronous programming in embedded systems, particularly when working with no_std environments and task executors.

Core Features & Use Cases

  • Async Executor: Enables no-alloc, no-heap task execution with a single stack, and replaces kernel context switching.
  • Low Power Management: Auto-sleeps during idle times, wakes via interrupts, ideal for battery-powered devices.
  • Key Crates: Offers crates like embassy-executor, embassy-time, and embassy-sync for async task runtime, timers, and synchronization primitives.
  • HAL Support: Compatible with STM32, nRF, RP, MSPM0, ESP32, and RISC-V for various embedded platforms.

Quick Start

To initialize an embassy executor in Rust, run: ```rust use embassy_executor::Spawner;

#[embassy_executor::main] async fn main(spawner: Spawner) { spawner.spawn(background_task()).unwrap(); // Main task continues... }

Frequently Asked Questions about embassy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run async/await tasks in a no_std embedded environment without heap allocation?

Embassy facilitates efficient asynchronous programming in embedded systems using Rust's async/await syntax. It targets no_std environments, supports task executors, and includes key crates for execution, timing, and synchronization.

Does async embedded programming work with STM32, nRF, and ESP32 microcontrollers?

Yes, async embedded programming supports STM32, nRF, RP, MSPM0, ESP32, and RISC-V microcontrollers through dedicated Hardware Abstraction Layer (HAL) integration, enabling efficient task execution across various embedded platforms.

What is the best way to manage low power consumption during idle times on battery-powered embedded devices?

The best way to manage low power consumption on battery-powered embedded devices is using an async runtime that auto-sleeps during idle times and wakes via interrupts, eliminating manual power state management.

How do I initialize an async task executor and spawn background tasks in Rust?

To initialize an async task executor in Rust, use the main macro to create an async main function with a Spawner parameter, then call the spawn method to dispatch background tasks before continuing the main task execution.

What synchronization primitives are available for async task runtime in embedded systems?

For async task runtime in embedded systems, synchronization primitives are provided by dedicated crates like embassy-sync, alongside embassy-executor for task execution and embassy-time for timers, ensuring safe concurrent task operations.