Skip to content
actionbook avatar

Domain Embedded

Domain guide for embedded no_std Rust covering memory, interrupt safety, and peripheral ownership constraints.

CCM score
51 of 100
skills.sh installs
3.3K
GitHub stars
1.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers no_std design rules, the layer stack from PAC to HAL to framework to traits, and framework choice between RTIC, Embassy, and bare metal
  • Includes key crate picks (cortex-m-rt, heapless, embedded-hal, defmt, panic-probe) and a static-peripheral code pattern using Mutex<RefCell<Option<T>>>
  • Enforces no heap allocation, critical sections around ISR-shared state, and no blocking work inside interrupt handlers
  • Designed for developers writing firmware for Cortex-M, RISC-V, ESP32, STM32, or nRF targets

Install

$ npx -y skills add actionbook/rust-skills --skill domain-embedded -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Project Context (Auto-Injected)

Target configuration: !cat .cargo/config.toml 2>/dev/null || echo "No .cargo/config.toml found"


Embedded Domain

Layer 3: Domain Constraints

Domain Constraints → Design Implications

Domain RuleDesign ConstraintRust Implication
No heapStack allocationheapless, no Box/Vec
No stdCore only#![no_std]
Real-timePredictable timingNo dynamic alloc
Resource limitedMinimal memoryStatic buffers
Hardware safetySafe peripheral accessHAL + ownership
Interrupt safeNo blocking in ISRAtomic, critical sections

Critical Constraints

No Dynamic Allocation

RULE: Cannot use heap (no allocator)
WHY: Deterministic memory, no OOM
RUST: heapless::Vec<T, N>, arrays

Interrupt Safety

RULE: Shared state must be interrupt-safe
WHY: ISR can preempt at any time
RUST: Mutex<RefCell<T>> + critical section

Hardware Ownership

RULE: Peripherals must have clear ownership
WHY: Prevent conflicting access
RUST: HAL takes ownership, singletons

Trace Down ↓

Details

Repository
github.com/actionbook/rust-skills
Categories
Rust, Go
First seen
Jun 3, 2026

More from actionbook/rust-skills

All 38

Similar to Domain Embedded

More Rust