rust-embedded-no-std

Guides writing, porting, and debugging bare-metal Rust firmware and no_std libraries.

2|1|Updated Aug 19, 2026
One-click install
npx skills add https://github.com/po4yka/rust-skills --skill rust-embedded-no-std-po4yka
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-embedded-no-std
Source: https://github.com/po4yka/rust-skills/tree/main/skills/rust-embedded-no-std
Command: npx skills add https://github.com/po4yka/rust-skills --skill rust-embedded-no-std-po4yka

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Bare-metal Rust firmware fails in ways host testing cannot catch: wrong linker layouts, missing panic handlers, atomics unsupported on the target core, DMA buffer lifetime bugs, and silent memory overflows. This Skill provides concrete triage tables, verification commands, and completion checklists so embedded Rust code stays bootable, bounded, and observable. ## Core Features & Use Cases - Failure triage table: Maps concrete compiler and linker errors (E0599 missing fetch_add, duplicate panic implementations, defmt link errors, region overflow) to their causes and fixes. - Target and concurrency rules: Covers target selection via rustc --print cfg, portable-atomic for cores without CAS, critical-section ownership, and bounded interrupt-shared state under edition 2024. - Verification workflow: Provides host-test commands, thumbv6m no-CAS checks, ELF inspection with cargo-binutils, and probe-rs flashing with explicit chip selection. - Use Case: When porting an Embassy driver to a thumbv6m-none-eabi chip, use this Skill to add the portable-atomic check, select one critical-section backend in the final binary, and verify the release ELF fits the declared memory regions. ## Quick Start Ask the agent to review your no_std firmware crate for boot, atomics, panic policy, and memory-layout issues using the embedded Rust guidelines.

Frequently Asked Questions about rust-embedded-no-std

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

FAQPage Schema
How do I fix E0599 no method named fetch_add on embedded Rust targets?▼

E0599 on fetch_add means the target lacks compare-and-swap support, common on thumbv6m-none-eabi and riscv32imc. Use the portable-atomic crate; the library depends on it without a backend feature, and the final binary selects the backend such as critical-section.

Embassy vs RTIC: which async framework for embedded Rust?▼

Choose Embassy for many I/O waits with static async tasks, and RTIC for priority-driven tasks with static resources. Do not mix both in one binary unless a platform contract requires it, since each framework needs control of execution and interrupt resources.

Does Rust stable support custom JSON target specs for embedded chips?▼

No. Since Rust 1.95, custom JSON target specs require a pinned nightly with -Z unstable-options, -Z json-target-spec, and -Z build-std=core. Prefer a built-in Tier 2 target installed via rustup target add whenever one matches the CPU and ABI.

Why does my firmware flash successfully but not start?▼

A successful flash does not prove the image fits or boots. Check the boot offset, vector table address, entry point, and runtime feature, and inspect the release ELF with cargo size and cargo objdump against the declared memory regions.

How do I share state between interrupt handlers and tasks in Rust?▼

Avoid static mut, which edition 2024 denies via static_mut_refs. Use an atomic, a critical_section::Mutex<RefCell<T>>, or the framework's resource model, and document which contexts access the value and what makes access exclusive.

Why are defmt logs below ERROR level missing from my firmware?▼

defmt emits only ERROR messages unless the compile-time DEFMT_LOG value enables more. Set DEFMT_LOG in the build command or .cargo/config.toml, rebuild, and record the value with the ELF since decoding requires the exact ELF from the same build.