cross-compilation
Building a program on one kind of computer to run on another, such as on a laptop for an ESP32.
Cross-compilation compiles and links code for a target architecture different from the build host, using a target-specific standard library and linker configuration.
Examples
Running
cargo buildon a laptop with[build] target = "riscv32imac-unknown-none-elf"in.cargo/config.tomlproduces firmware for the ESP32-C6, not the laptop.The laptop is the host and the ESP32-C6 is the target; the binary can't run on the machine that built it.
See also