This covers the practical side of cross-compiling Rust: rustup targets, the cross tool for Docker-based builds, and cargo-zigbuild for zero-setup compilation via zig cc. It's useful when you need to build for ARM on x86, create static musl binaries, or target embedded bare-metal systems. The workflow is concrete, with target triples for common platforms like aarch64 Linux, Windows, macOS, and Cortex-M microcontrollers. Cross and cargo-zigbuild are both solid choices, but zigbuild wins on speed and simplicity if you don't need Docker isolation. The embedded section shows the no_std setup with memory.x linker scripts and probe-run for actual hardware.

skills.sh installs
565
GitHub stars
279
last updated
Aug 21, 2026

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill rust-cross --agent claude-code

Installs into .claude/skills of the current project.

Files

Rust Cross-Compilation

Purpose

Guide agents through Rust cross-compilation: adding rustup targets, using cross for hermetic Docker-based cross-builds, cargo-zigbuild for zero-setup cross-compilation, .cargo/config.toml configuration, and embedded bare-metal targets.

Triggers

  • "How do I cross-compile Rust for ARM/aarch64?"
  • "How do I build a Rust binary for a different OS?"
  • "How do I use the cross tool for Rust cross-compilation?"
  • "How do I build Rust for embedded (no_std) targets?"
  • "How do I use cargo-zigbuild?"
  • "My cross-compiled Rust binary won't run on the target"

Workflow

1. Add a rustup target

# List installed targets
rustup target list --installed

# List all available targets
rustup target list

# Add a target
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-musl   # static Linux
rustup target add wasm32-unknown-unknown       # WASM
rustup target add thumbv7m-none-eabi          # Cortex-M

# Build for target
cargo build --target aarch64-unknown-linux-gnu --release

2. Common target triples

Sponsors

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Categories
Code Review & Quality, Rust
First seen
Jun 3, 2026

More from mohitmishra786/low-level-dev-skills

All 54
1plugin87 avatardesign-componentplugin87/ux-ui-agent-skillsDesign a UI component spec to the house quality bar — anatomy, variants, sizes, the 8 states, token mapping, and accessibility. Use when the user wants to desig565skills.sh installs
2davila7 avatartailwind-patternsdavila7/claude-code-templatesTailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.564skills.sh installs
3plugin87 avatarux-writingplugin87/ux-ui-agent-skillsWrite or review UI copy — buttons, errors, empty states, microcopy, notifications, labels — using the voice & tone system (clear, concise, useful, human, honest564skills.sh installs
4rshankras avatarproduct-developmentrshankras/claude-code-apple-skillsEnd-to-end product development for iOS/macOS apps. Covers market research, competitive analysis, PRD generation, architecture specs, UX design, implementation g564skills.sh installs
5alirezarezvani avatarteam-communicationsalirezarezvani/claude-skillsWrite internal company communications — 3P updates (Progress/Plans/Problems), company-wide newsletters, FAQ roundups, incident reports, leadership updates, stat562skills.sh installs
6encoredev avatarencore-go-getting-startedencoredev/skillsBootstrap a brand-new Encore Go project from zero. Only for first-time CLI install and `encore app create` — not for architecture or feature questions.561skills.sh installs