Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Rust Embedded

ASecurity

Rust for embedded systems

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsrustgoc++bashnodedebugginggitperformance

Security Analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned 9/29/2026

$npx -y skills add ssrjkk/claude-skills --skill rust-embedded --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Embedded?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Rust Embedded
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ssrjkk-rust-embedded/badge)](https://www.skillsdirectory.com/skills/ssrjkk-rust-embedded)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: rust-embedded
description: "Rust for embedded systems"
category: embedded
tags: [rust, embedded, microcontroller, no-std, arm, risc-v]
models: [sonnet, opus]
version: 1.0.0
created: 2026-05-14
updated: 2026-09-06
---
# Rust Embedded

> Develop embedded systems firmware with Rust for safety, performance, and modern tooling.

## Quick Start
```rust
//! Blinky example for STM32 microcontroller
#![no_std]
#![no_main]

use cortex_m_rt::entry;
use panic_halt as _;
use stm32f4xx_hal::{
    pac,
    prelude::*,
    timer::Timer,
};
use embedded_hal::digital::OutputPin;

#[entry]
fn main() -> ! {
    // Get peripherals
    let dp = pac::Peripherals::take().unwrap();
    let cp = cortex_m::Peripherals::take().unwrap();

    // Configure clocks
    let rcc = dp.RCC.constrain();
    let clocks = rcc.cfgr.sysclk(48.MHz()).freeze();

    // Configure LED pin (PC13 on many STM32 boards)
    let gpioc = dp.GPIOC.split();
    let mut led = gpioc.pc13.into_push_pull_output();

    // Configure timer
    let mut timer = Timer::syst(cp.SYST, 1.Hz(), &clocks);

    // Blink loop
    loop {
        led.set_high().unwrap();
        timer.wait(); // 1 second delay
        led.set_low().unwrap();
        timer.wait();
    }
}
```

```toml
# .cargo/config.toml — Cross-compilation target
[target.thumbv7em-none-eabihf]
runner = "gdb-multiarch"
rustflags = ["-C", "link-arg=-Tlink.x", "-C", "linker=arm-none-eabi-gcc"]

[build]
target = "thumbv7em-none-eabihf"
```

```rust
// Embedded HAL traits — abstraction for portability
use embedded_hal::{
    blocking::delay::DelayMs,
    digital::OutputPin,
    spi::SpiDevice,
};

fn control_display<D: DelayMs<u32>, P: OutputPin>(
    delay: &mut D,
    reset: &mut P,
) {
    reset.set_low().unwrap();
    delay.delay_ms(10);
    reset.set_high().unwrap();
    delay.delay_ms(100);
}
```

## Key Concepts
`#![no_std]` enables bare-metal code without the standard library. The Embedded HAL provides portable hardware abstraction. `cortex-m-rt` handles vector table and startup. Use probe-rs for flashing and debugging.

## When to Use
- Firmware for ARM Cortex-M, RISC-V microcontrollers
- IoT sensor nodes and actuators
- Safety-critical embedded systems
- Replacing C/C++ with memory-safe Rust

## Step-by-Step
1. Pick the board/target: install `rustup target add thumbv7em-none-eabihf` for Cortex-M4F or the RISC-V equivalent.
2. Configure the linker: add `.cargo/config.toml` with `rustflags` (link.x) and default build target.
3. Scaffold a `no_std` crate: use `#![no_std]` + `#![no_main]`, add `cortex-m-rt` for startup and a panic handler.
4. Get a HAL: enable `stm32f4xx_hal` (or `nrf-hal`, `esp-hal`) peripheral features matching the chip.
5. Flash & debug: use `probe-rs`/`cargo embed` (or `openocd + gdb-multiarch`) with the target config.
6. Verify on device: blink an LED, then exercise a sensor/UART; check binary size with `cargo size`.

## Examples
```rust
// Read a button and toggle an LED via embedded-hal traits
#![no_std]
#![no_main]
use cortex_m_rt::entry;
use panic_halt as _;
use stm32f4xx_hal::{pac, prelude::*, gpio::Edge};
use embedded_hal::digital::{InputPin, OutputPin};

#[entry]
fn main() -> ! {
    let dp = pac::Peripherals::take().unwrap();
    let rcc = dp.RCC.constrain();
    let clocks = rcc.cfgr.sysclk(48.MHz()).freeze();
    let gpioa = dp.GPIOA.split(&clocks);
    let gpioc = dp.GPIOC.split();

    let mut led = gpioc.pc13.into_push_pull_output();
    let btn = gpioa.pa0.into_pull_up_input();

    loop {
        if btn.is_low().unwrap() {
            led.set_high().unwrap();
        } else {
            led.set_low().unwrap();
        }
        cortex_m::asm::delay(100_000);
    }
}
```
```bash
# Build, flash, and inspect the binary
cargo build --release
cargo size --release
cargo embed --release   # flashes via probe-rs using the target config
```

## Validation
1. `cargo build --target thumbv7em-none-eabihf` compiles without std
2. Firmware flashes to device and runs (LED blinks)
3. UART/sensor output matches expected values
4. Binary size fits within target flash memory

Attribution

ssrjkkssrjkk
View sourceSee grades on GitHubMore from ssrjkk →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →