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.
| x8664-unknown-linux-gnu | Linux x86-64 (glibc) | | x8664-unknown-linux-musl | Linux x86-64 (musl, static) | | aarch64-unknown-linux-gnu | ARM64 Linux (Raspberry Pi 4, AWS Graviton) | | aarch64-unknown-linux-musl | ARM64 Linux static | | x8664-pc-windows-gnu | Windows x86-64 (MinGW) | | x8664-pc-windows-msvc | Windows x86-64 (MSVC) |
| x8664-apple-darwin | macOS x86-64 | | aarch64-apple-darwin | macOS Apple Silicon | | wasm32-unknown-unknown | WASM (browser) | | wasm32-wasi | WASM with WASI | | thumbv7m-none-eabi | Cortex-M3 bare metal | | thumbv7em-none-eabihf | Cortex-M4/M7 with FPU | | riscv32imac-unknown-none-elf | RISC-V 32-bit bare metal |
Rust-Cross-Compilation-Fähigkeit. Verwenden Sie diese Option, wenn Sie Rust-Binärdateien für eine andere Zielarchitektur oder ein anderes Betriebssystem erstellen, Cross oder Cargo-Zigbuild für eine hermetische Cross-Kompilierung verwenden, .cargo/config.toml für Cross-Ziele konfigurieren oder auf eingebettete und Bare-Metal-Systeme abzielen. Wird bei Abfragen zu Rust-Cross-Compilation, Rustup-Zielen, Cross-Tool, Cargo-Zigbuild, Aarch64-Unknown-Linux-Gnu, Thumbv7m-None-Eabi oder Building für Embedded aktiviert. Quelle: mohitmishra786/low-level-dev-skills.