
Domain Embedded
Auto-injects when you're writing firmware for microcontrollers in Rust. It enforces the big constraints: no heap allocation (use heapless collections), interrupt safety (critical sections and Mutex patterns), and proper peripheral ownership through HAL singletons. The trace down approach is smart here because embedded constraints force specific design patterns. If you're working on STM32, ESP32, or Nordic chips and keep forgetting whether you need RefCell inside or outside the Mutex, this keeps the patterns visible. The framework comparison table (RTIC vs Embassy vs bare metal) is genuinely useful when you're picking a concurrency model. It's opinionated about safety, which is the right stance when a race condition can brick hardware.
- skills.sh installs
- 625
- GitHub stars
- 1.3K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add zhanghandong/rust-skills --skill domain-embedded --agent claude-codeInstalls into .claude/skills of the current project.
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 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 |
| Hardware safety | Safe peripheral access | HAL + ownership |
| Interrupt safe | No blocking in ISR | Atomic, 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 ↓
Sponsors
Details
- Repository
- github.com/zhanghandong/rust-skills
- Category
- Rust
- First seen
- May 16, 2026
More from zhanghandong/rust-skills
All 34- Domain Cloud Native596
- Domain Fintech581
- Domain Ml573
- Domain Iot568
- M15 Anti Pattern5.6K
- Coding Guidelines1.2K
- M10 Performance895
- M07 Concurrency844
- M06 Error Handling827
- Rust Refactor Helper821
- M01 Ownership809
- M04 Zero Cost789
- M05 Type Driven786
- M02 Resource783
- M03 Mutability773
- M12 Lifecycle764
- M14 Mental Model751
- M09 Domain750
- M11 Ecosystem747
- M13 Domain Error738
- Rust Trait Explorer731
- Rust Code Navigator728
- Unsafe Checker726
- Domain Cli709