Guide nostd Rust development for embedded and bare-metal targets.

MITAuto-check passedDevelopment

Install Rust No Std

skills CLI
$ npx skills add mohitmishra786/low-level-dev-skills --skill rust-no-std -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitmishra786/low-level-dev-skills rust-no-std --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rust/rust-no-std .claude/skills/rust-no-std && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rust-no-std
GitHub stars
253
Token cost
~1.8k tokens
SKILL.md length
355 words
Files
1
Skills in repo
138
Repo updated
First seen
Licence
MIT

At a glance

Guide nostd Rust development for embedded and bare-metal targets.

  • Works in 6 steps: no_std crate structure → core vs alloc vs std → Custom global allocator → …
  • Writing ![nostd] crates
  • SKILL.md covers Purpose, When to Use, Examples and Workflow, plus 1 more section
  • Calls cargo

What it does

Rust No Std is an agent skill from mohitmishra786/low-level-dev-skills. Guide nostd Rust development for embedded and bare-metal targets. Use when writing ![nostd] crates, understanding core vs alloc vs std, implementing custom global allocators, selecting panic handlers for embedded, or testing nostd crates on the host without hardware.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with Rust. The repository describes itself as: A curated suite of AI agent skills for systems and low-level programming with C/C++, Rust, and Zig toolchains, covering compilers, debuggers, profilers, build systems…. The licence is MIT.

When your agent uses it

  • Writing ![nostd] crates
  • Understanding core vs alloc vs std
  • Implementing custom global allocators
  • Selecting panic handlers for embedded

Example prompts

  • “/rust-no-std”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. no_std crate structure
  2. core vs alloc vs std
  3. Custom global allocator
  4. Panic handler
  5. Writing portable no_std libraries
  6. Testing no_std on host

What it can do on your machine

Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rust No Std loads about 1.8k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 355 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 355 words, ~1,816 tokens.

Download SKILL.mdSave it as .claude/skills/rust-no-std/SKILL.md (or your agent's skills folder).
name
rust-no-std
description
Guide no_std Rust development for embedded and bare-metal targets. Use when writing #![no_std] crates, understanding core vs alloc vs std, implementing custom global allocators, selecting panic handlers for embedded, or testing no_std crates on the host without hardware.
user-invocable
true
triggers
write a no_std Rust crate, use Vec or String without std in Rust, implement a global allocator in Rust, handle panics in no_std embedded Rust, test a no_std…

Rust no_std

Purpose

Guide agents through #![no_std] Rust development: what core and alloc provide vs std, implementing custom global allocators, panic handler selection for embedded targets, and strategies for testing no_std crates on the host machine.

When to Use

Use this skill when writing or debugging #![no_std] Rust code — library crates for embedded targets, or bare-metal firmware that cannot link against std. For the full embedded development workflow (probe-rs flashing, defmt logging, RTIC), use skills/embedded/embedded-rust. For cross-compilation target setup, use skills/rust/rust-cross. This skill focuses specifically on the no_std / core / alloc boundary and panic handler selection.

Examples

  • "I need a parser crate that works without std" → structure with #![no_std], feature-gate alloc APIs, use borrowed slices for core API
  • "How do I use Vec in a no_std environment?" → add alloc feature, provide a global allocator (e.g., linked-list-allocator), use alloc::vec::Vec
  • "How do I test my no_std crate on my laptop?" → use #![cfg_attr(not(test), no_std)] to allow std in test mode, or cargo test --target x86_64-unknown-linux-gnu

Workflow

1. no_std crate structure
rust
// src/lib.rs
#![no_std]

// core is always available (no OS needed)
use core::fmt;
use core::mem;
use core::slice;

// alloc: heap collections — requires a global allocator
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "alloc")]
use alloc::{vec::Vec, string::String, boxed::Box, format};

pub fn add(a: u32, b: u32) -> u32 {
    a + b
}
toml
# Cargo.toml
[features]
default = []
alloc = []       # opt-in to heap allocation

[dependencies]
# no_std-compatible dependencies only
2. core vs alloc vs std
CrateRequires OSRequires heapProvides
coreNoNoPrimitives, traits, iter, fmt, mem, ptr, slice, option, result
allocNoYes (allocator)Vec, String, Box, Arc, Rc, HashMap (requires global allocator)
stdYesYesAll of core + alloc + OS APIs (threads, files, sockets, env)

std re-exports everything in core and alloc, so use std::fmt and use core::fmt are equivalent when std is available.

What's available in core only (no heap, no OS):

rust
// These work in no_std:
core::fmt::Write           // trait for write! macro
core::iter                 // iterators
core::ops                  // operators (+, -, *, Deref, etc.)
core::option::Option
core::result::Result
core::mem::{size_of, align_of, swap, replace}
core::ptr::{read, write, null, NonNull}
core::slice, core::str
core::sync::atomic         // atomic types
core::cell::{Cell, UnsafeCell, RefCell}
core::cmp, core::convert, core::clone, core::default
core::num                  // numeric conversions
core::panic::PanicInfo     // for panic handler
Show full SKILL.md (111 more words)Show less
3. Custom global allocator

To use alloc crate in no_std, provide a global allocator:

rust
// src/allocator.rs — embedded allocator using linked_list_allocator
use linked_list_allocator::LockedHeap;

#[global_allocator]
static ALLOCATOR: LockedHeap = LockedHeap::empty();

pub fn init_heap(heap_start: usize, heap_size: usize) {
    unsafe {
        ALLOCATOR.lock().init(heap_start as *mut u8, heap_size);
    }
}
toml
[dependencies]
linked-list-allocator = { version = "0.10", default-features = false }
rust
// src/main.rs (bare-metal)
#![no_std]
#![no_main]

extern crate alloc;
use alloc::vec::Vec;

mod allocator;

// In init code (after BSS/data init):
allocator::init_heap(0x20010000, 0x10000);  // 64KB heap at RAM+64KB

// Now alloc types work:
let mut v: Vec<u32> = Vec::new();
v.push(42);

Common embedded allocator crates:

  • linked-list-allocator: general purpose, no_std
  • buddy-alloc: power-of-two buddy system
  • dlmalloc: port of Doug Lea's malloc
  • talc: fast, suited for embedded
4. Panic handler

In no_std, you must provide a panic handler — Rust requires one:

rust
// Option 1: halt on panic (simplest, production)
use core::panic::PanicInfo;

#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
    loop {}  // spin forever
}

// Option 2: print panic info via defmt (embedded with debug probe)
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
    defmt::error!("{}", defmt::Display2Format(info));
    cortex_m::asm::udf();  // undefined instruction → hard fault
}

// Option 3: use a panic crate (in Cargo.toml)
// panic-halt = "0.2"   — spin loop
// panic-reset = "0.1.1" — reset MCU
// panic-probe = "0.3"   — defmt + probe-rs
5. Writing portable no_std libraries

Design your library to work with and without alloc:

rust
#![no_std]
#[cfg(feature = "alloc")]
extern crate alloc;

pub struct Parser<'a> {
    data: &'a [u8],         // borrowed slice: no allocation needed
    pos: usize,
}

impl<'a> Parser<'a> {
    pub fn new(data: &'a [u8]) -> Self {
        Parser { data, pos: 0 }
    }

    // Core API: return borrowed data, no allocation
    pub fn next_token(&mut self) -> Option<&'a [u8]> { /* ... */ None }

    // Alloc API: only when alloc feature is enabled
    #[cfg(feature = "alloc")]
    pub fn collect_all(&mut self) -> alloc::vec::Vec<&'a [u8]> {
        let mut tokens = alloc::vec::Vec::new();
        while let Some(tok) = self.next_token() {
            tokens.push(tok);
        }
        tokens
    }
}
6. Testing no_std on host
toml
# Cargo.toml
[dev-dependencies]
std = []   # allow std in tests only (via cfg)

[features]
std = []
rust
// lib.rs
#![cfg_attr(not(test), no_std)]  // no_std except during tests
// Tests compile normally with std — only library code is no_std

Or use a separate test harness:

bash
# Run tests targeting the host (std available for test framework)
cargo test --target x86_64-unknown-linux-gnu

# Test with the actual embedded target using QEMU
cargo test --target thumbv7em-none-eabihf  # fails: no test runner on bare metal

# Solution: use defmt-test or probe-run for on-target testing
# Or: architecture-neutral pure logic tests on host
bash
# Check no_std compliance without hardware
cargo check --target thumbv7em-none-eabihf
cargo build --target thumbv7em-none-eabihf
  • Use skills/embedded/embedded-rust for probe-rs, defmt, and RTIC with no_std
  • Use skills/rust/rust-cross for cross-compilation target setup
  • Use skills/rust/rust-unsafe for unsafe patterns needed in allocator implementations
  • Use skills/embedded/linker-scripts for heap region placement in bare-metal targets

© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/rust/rust-no-std of mohitmishra786/low-level-dev-skills.

Open the folder on GitHubat commit bdc5847

Compare with similar skills

Rust No Std next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rust No Std compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rust No Std this skillmohitmishra786/low-level-dev-skills253—~1.8kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
OpenLogi macOS Permissions TriageAprilNEA/OpenLogi23k—~2.5kAutomated safety check: NotesApache-2.0
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
Release Skillsnexmoe/eve4213 repos~3.3kAutomated safety check: PassNone

Similar skills

  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Release Skills

    nexmoe/eve

    Universal release workflow. An agent skill from nexmoe/eve.

    421 GitHub starsUsed in 3 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Pnpm Engine

    teambit/bit

    Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.

    18k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed

More from mohitmishra786/low-level-dev-skills

All 138 skills in this repo
  • ARM and AArch64 Assembly

    mohitmishra786/low-level-dev-skills

    Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.

    253 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • RISC-V Assembly Guide

    mohitmishra786/low-level-dev-skills

    Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.

    253 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • x86-64 Assembly Reference

    mohitmishra786/low-level-dev-skills

    Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Bazel for C and C++

    mohitmishra786/low-level-dev-skills

    Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.

    253 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Binary Hardening

    mohitmishra786/low-level-dev-skills

    Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed
  • Binutils

    mohitmishra786/low-level-dev-skills

    GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.

    253 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Categories

Questions about Rust No Std

What does Rust No Std do?

Guide nostd Rust development for embedded and bare-metal targets. Rust No Std is an agent skill from mohitmishra786/low-level-dev-skills. Guide nostd Rust development for embedded and bare-metal targets.

When should I use Rust No Std?

Rust No Std fits situations like: writing ![nostd] crates; understanding core vs alloc vs std; implementing custom global allocators; selecting panic handlers for embedded.

How do I install Rust No Std in Claude Code?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill rust-no-std -a claude-code`. Or copy the skill folder (skills/rust/rust-no-std in mohitmishra786/low-level-dev-skills) into .claude/skills/rust-no-std in your project. Claude Code loads it when a task matches its description.

How do I install Rust No Std in Codex?

Run `npx skills add mohitmishra786/low-level-dev-skills --skill rust-no-std -a codex`. Or copy the skill folder (skills/rust/rust-no-std in mohitmishra786/low-level-dev-skills) into .agents/skills/rust-no-std in your project. Codex loads it when a task matches its description.

Can I use Rust No Std in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill rust-no-std -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-no-std, .gemini/skills/rust-no-std, .github/skills/rust-no-std and .opencode/skills/rust-no-std in your project.

What does Rust No Std need to run?

Going by SKILL.md and its folder, Rust No Std needs the command-line tools its instructions call (cargo).

Does Rust No Std access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rust No Std safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rust No Std use?

Rust No Std is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rust No Std use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rust No Std?

Skills that share tags, products or a category with Rust No Std: Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Rust Best Practices (farm-fe/farm, 5.6k stars), OpenLogi macOS Permissions Triage (AprilNEA/OpenLogi, 23k stars) and RTK Rust Design Patterns (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rust No Std?

mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 253 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.

Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.