domain-embedded

Guide embedded Rust design with no_std, heapless, and interrupt-safe patterns.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill domain-embedded-jmduea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-embedded
Source: https://github.com/jmduea/emotiv-cortex-rs/tree/main/.github/skills/domain-embedded
Command: npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill domain-embedded-jmduea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Embedded Rust development must obey strict constraints such as no_std, no heap, deterministic timing, and safe peripheral access, which can be difficult to remember and apply correctly.

Core Features & Use Cases

  • Domain Constraints Table: Summarizes rules like “No heap”, “No std”, and their Rust implications.
  • Design Pattern Library: Shows static state, interrupt‑safe mutexes, and peripheral ownership examples.
  • Crate Recommendations: Lists essential crates such as heapless, embedded-hal, cortex-m-rt, and frameworks like RTIC or Embassy.
  • Use Case: Quickly create a no_std project for an STM32 microcontroller with proper panic handling and static buffers.

Quick Start

Ask the domain-embedded skill to generate a no_std project skeleton for an STM32 microcontroller.

Frequently Asked Questions about domain-embedded

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

FAQPage Schema
How do I write no_std Rust firmware for a microcontroller?

No_std Rust firmware requires avoiding the standard library and heap allocation by using heapless data structures, static state, and HAL frameworks to ensure deterministic timing and safe peripheral ownership.

What are the design constraints for embedded Rust applications?

Embedded Rust applications must follow constraints like no_std, no heap allocation, deterministic timing, and safe peripheral access. These rules prevent undefined behavior and ensure the firmware runs reliably on microcontrollers without an operating system.

How do I generate a no_std project skeleton for an STM32 microcontroller?

You can generate a no_std project skeleton for an STM32 microcontroller by applying interrupt-safe mutex patterns, static buffers for memory allocation, and proper panic handling to ensure safe peripheral ownership and deterministic execution.

Which crates do I need for interrupt-safe embedded Rust development?

For interrupt-safe embedded Rust development, essential crates include heapless for static data structures, embedded-hal for peripheral abstraction, cortex-m-rt for runtime, and frameworks like RTIC or Embassy to manage safe peripheral ownership.

How do I manage peripheral ownership safely in RTIC frameworks?

You manage peripheral ownership safely in RTIC frameworks by transferring hardware resources to the framework at initialization, using interrupt-safe mutexes to share static state, and ensuring deterministic timing without dynamic heap allocation.

Why does my embedded Rust project fail without heapless data structures?

Your embedded Rust project fails without heapless data structures because no_std environments prohibit heap allocation. Using fixed-size static buffers provided by heapless crates enforces deterministic timing and avoids runtime memory allocation errors.