domain-embedded

Installation
Summary

Embedded and no_std Rust development constraints, patterns, and critical safety rules for microcontroller firmware.

  • Enforces no dynamic allocation (heap-free design using heapless collections), no_std compilation, and static memory buffers for deterministic resource usage on resource-constrained devices
  • Covers interrupt safety through critical sections and Mutex<RefCell> patterns to prevent race conditions when shared state is accessed from ISRs
  • Provides hardware ownership patterns (singleton peripherals, HAL-based access) to prevent conflicting peripheral access and unsafe register manipulation
  • Includes framework guidance for RTIC (priority-based), Embassy (async), and bare-metal approaches, plus key crates (cortex-m-rt, heapless, embedded-hal, defmt, probe-run)
  • Documents common mistakes (Vec instead of heapless::Vec, missing critical sections, blocking in ISRs) with fixes tied to design patterns
SKILL.md
Contains Shell Commands

This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.

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 Rule Design Constraint Rust Implication
No heap Stack allocation heapless, no Box/Vec
No std Core only #![no_std]
Real-time Predictable timing No dynamic alloc
Resource limited Minimal memory Static buffers
Related skills

More from zhanghandong/rust-skills

Installs
534
GitHub Stars
1.1K
First Seen
Jan 20, 2026