rust-cross

Configure rustup targets and cargo settings for cross-compiling Rust binaries.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/awfixers-stuff/opencode-config --skill rust-cross-awfixers-stuff
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-cross
Source: https://github.com/awfixers-stuff/opencode-config/tree/main/skills/rust-cross
Command: npx skills add https://github.com/awfixers-stuff/opencode-config --skill rust-cross-awfixers-stuff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Cross-compiling Rust projects is complex due to differing toolchains, linkers, C library compatibility, and embedded no_std constraints; this guide reduces that friction by describing how to add rustup targets, choose hermetic build tools, and configure project-level cargo settings for reproducible builds.

Core Features & Use Cases

  • Add and manage rustup targets: instructions for listing and adding platform triples such as aarch64, x86_64-musl, wasm, and thumbv7 targets.
  • Hermetic builds with cross and cargo-zigbuild: choose Docker-based cross for convenience or zig cc for zero-setup cross linking and precise glibc targeting.
  • Project configuration: configure .cargo/config.toml linkers, runners, and rustflags for static musl binaries, WASM runners, or embedded probe-run setups.
  • Embedded and bare-metal workflows: guidance for no_std projects, default targets, linker scripts, and release profile tuning for Cortex-M and RISC-V MCUs.

Quick Start

Use the rust-cross skill to add the aarch64-unknown-linux-gnu target, pick either cross or cargo-zigbuild for your workflow, and build a release artifact for that target.

Frequently Asked Questions about rust-cross

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

FAQPage Schema
How do I cross-compile Rust binaries for different target architectures?▼

Cross-compile Rust binaries by adding platform triples with rustup, configuring .cargo/config.toml linkers, and selecting hermetic build tools like cross or cargo-zigbuild for reproducible builds across different operating systems and architectures.

What is the best way to build static musl binaries with a specific glibc version?▼

Build static musl binaries with specific glibc targeting by using cargo-zigbuild, which provides zero-setup cross linking and precise glibc version control without requiring complex local toolchain configurations.

Does this approach work with embedded bare-metal ARM and RISC-V projects?▼

Embedded bare-metal ARM and RISC-V projects are supported through guidance for no_std setups, default target selection, linker scripts, and release profile tuning for Cortex-M and RISC-V MCUs using probe-run configurations.

How do I configure .cargo/config.toml for WASM runners and static musl binaries?▼

Configure .cargo/config.toml by setting appropriate linkers, runners, and rustflags for static musl binaries, WASM runners, or embedded probe-run setups to ensure correct cross-compilation behavior for your target.

Should I use Docker-based cross or cargo-zigbuild for hermetic Rust builds?▼

Choose Docker-based cross for convenience in isolated environments or cargo-zigbuild for zero-setup cross linking and precise glibc targeting, depending on whether you prioritize container isolation or minimal local setup.

How do I add rustup targets for WebAssembly and aarch64 platforms?▼

Add rustup targets for WebAssembly and aarch64 platforms by listing and installing specific platform triples like aarch64-unknown-linux-gnu or wasm targets using standard rustup target add commands.