Embedded and no_std Rust development constraints, patterns, and critical safety rules for microcontroller firmware.
Works with
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 patte
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiondomain-embeddedExecute the skills CLI command in your project's root directory to begin installation:
Fetches domain-embedded from zhanghandong/rust-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate domain-embedded. Access via /domain-embedded in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
979
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
979
stars
Target configuration:
!cat .cargo/config.toml 2>/dev/null || echo "No .cargo/config.toml found"
Layer 3: Domain Constraints
| 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 |
RULE: Cannot use heap (no allocator)
WHY: Deterministic memory, no OOM
RUST: heapless::Vec<T, N>, arrays
RULE: Shared state must be interrupt-safe
WHY: ISR can preempt at any time
RUST: Mutex<RefCell<T>> + critical section
RULE: Peripherals must have clear ownership
WHY: Prevent conflicting access
RUST: HAL takes ownership, singletons
From constraints to design (Layer 2):
"Need no_std compatible data structures"
โ m02-resource: heapless collections
โ Static sizing: heapless::Vec<T, N>
"Need interrupt-safe state"
โ m03-mutability: Mutex<RefCell<Option<T>>>
โ m07-concurrency: Critical sections
"Need peripheral ownership"
โ m01-ownership: Singleton pattern
โ m12-lifecycle: RAII for hardware
| Layer | Examples | Purpose |
|---|---|---|
| PAC | stm32f4, esp32c3 | Register access |
| HAL | stm32f4xx-hal | Hardware abstraction |
| Framework | RTIC, Embassy | Concurrency |
| Traits | embedded-hal | Portable drivers |
| Framework | Style | Best For |
|---|---|---|
| RTIC | Priority-based | Interrupt-driven apps |
| Embassy | Async | Complex state machines |
| Bare metal | Manual | Simple apps |
| Purpose | Crate |
|---|---|
| Runtime (ARM) | cortex-m-rt |
| Panic handler | panic-halt, panic-probe |
| Collections | heapless |
| HAL traits | embedded-hal |
| Logging | defmt |
| Flash/debug | probe-run |
| Pattern | Purpose | Implementation |
|---|---|---|
| no_std setup | Bare metal | #![no_std] + #![no_main] |
| Entry point | Startup | #[entry] or embassy |
| Static state | ISR access | Mutex<RefCell<Option<T>>> |
| Fixed buffers | No heap | heapless::Vec<T, N> |
#![no_std]
#![no_main]
use cortex_m::interrupt::{self, Mutex};
use core::cell::RefCell;
static LED: Mutex<RefCell<Option<Led>>> = Mutex::new(RefCell::new(None));
#[entry]
fn main() -> ! {
let dp = pac::Peripherals::take().unwrap();
let led = Led::new(dp.GPIOA);
interrupt::free(|cs| {
LED.borrow(cs).replace(Some(led));
});
loop {
interrupt::free(|cs| {
if let Some(led) = LED.borrow(cs).borrow_mut().as_mut() {
led.toggle();
}
});
}
}
| Mistake | Domain Violation | Fix |
|---|---|---|
| Using Vec | Heap allocation | heapless::Vec |
| No critical section | Race with ISR | Mutex + interrupt::free |
| Blocking in ISR | Missed interrupts | Defer to main loop |
| Unsafe peripheral | Hardware conflict | HAL ownership |
| Constraint | Layer 2 Pattern | Layer 1 Implementation |
|---|---|---|
| No heap | Static collections | heapless::Vec<T, N> |
| ISR safety | Critical sections | Mutex<RefCell> |
| Hardware ownership | Singleton | take().unwrap() |
| no_std | Core-only | #![no_std], #![no_main] |
| When | See |
|---|---|
| Static memory | m02-resource |
| Interior mutability | m03-mutability |
| Interrupt patterns | m07-concurrency |
| Unsafe for hardware | unsafe-checker |
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
โ Do
โ Don't
๐ก Pro Tips
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
jeffallan/claude-skills
davila7/claude-code-templates
intellectronica/agent-skills
am-will/codex-skills
sickn33/antigravity-awesome-skills
sickn33/antigravity-awesome-skills
Keeps context tight: domain-embedded is the kind of skill you can hand to a new teammate without a long onboarding doc.
I recommend domain-embedded for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Solid pick for teams standardizing on skills: domain-embedded is focused, and the summary matches what you get after install.
domain-embedded fits our agent workflows well โ practical, well scoped, and easy to wire into existing repos.
Registry listing for domain-embedded matched our evaluation โ installs cleanly and behaves as described in the markdown.
domain-embedded has been reliable in day-to-day use. Documentation quality is above average for community skills.
We added domain-embedded from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
domain-embedded reduced setup friction for our internal harness; good balance of opinion and flexibility.
domain-embedded reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added domain-embedded from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 43