/odin-native:rust-crossfrom ODIN Native
Guides cross-compilation of Rust binaries for different architectures, OSes, or bare-metal targets using cross, cargo-zigbuild, or direct cargo with linker configuration.
Ships in ODIN Native. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Field | Bound contract |
|---|---|
| Trigger | Building Rust for a target with a different architecture, OS, or ABI; configuring cross-compilation in .cargo/config.toml; or targeting bare-metal embedded devices. |
| Authority | Reversible local. Edits .cargo/config.toml, Cross.toml, Cargo.toml, installs rustup targets, and writes target/ build directories; rollback reverts the edited files, runs rustup target remove <triple> for targets this skill added, and removes build artifacts. No remote mutation. |
| Side effect | Local configuration files, rustup installed targets, build artifacts, and Docker images if cross is used. |
| Done | The chosen target builds with the selected driver and the output matches the intended target triple and linking mode. |
aarch64-unknown-linux-gnu, thumbv7em-none-eabihf).rustup targets from rustup target list --installed.cargo, cross, cargo-zigbuild, or direct rustc with a system cross-linker.zig cc, or a system cross-linker.qemu command.references/cross-targets.md if the platform is not known. Done when: the triple is selected and the matching rustup target add <triple> command is known.rustup target add <triple> and confirm it appears in rustup target list --installed. Done when: the target is installed.cross build --target <triple> for hermetic Docker-based builds; add a Cross.toml when the image needs extra packages.cargo zigbuild --target <triple> to avoid a system cross-linker; install cargo-zigbuild and a Zig toolchain.cargo build --target <triple> with a linker set in .cargo/config.toml for direct builds.
Done when: the driver is installed and a sample command runs without linker errors..cargo/config.toml, add a [target.<triple>] section with linker, runner, and rustflags as needed. For a static musl build, set rustflags = ["-C", "target-feature=+crt-static"]. For bare metal, set the default target and runner. Done when: .cargo/config.toml contains a valid target section.file <binary> or readelf -h <binary> to confirm the ELF machine type and linking mode. For Windows or macOS targets, use file or objdump -f. Done when: the output reports the intended architecture and the build exits 0.| Failure class | Behavior |
|---|---|
| Target not installed | Run rustup target add <triple> and retry. |
| Linker not found | Install the system cross-linker or switch to cargo-zigbuild. |
cross fails on a C dependency | Add a pre-build step to Cross.toml to install the target package. |
glibc version mismatch with cargo-zigbuild | Append a glibc version to the triple, for example aarch64-unknown-linux-gnu.2.17. |
| Embedded binary does not run | Verify the runner, default target, and memory layout; check the probe or emulator configuration. |
.cargo/config.toml and optionally Cross.toml or Cargo.toml profiles.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odin-native138 skills in this plugin
/abi-and-calling-conventionsUse when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi./adc-dac-baremetalUse when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal./af-xdpUse when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.Other plugins' skills for the same job