Build target-specific binaries for packaging instead of running them locally.
Section: Targets and cross-compilation
Run is typically host-only
bash
bash
cargo build --target aarch64-apple-darwinExplanation
Cross-target binaries usually cannot be executed directly on the host unless compatible.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Targets and cross-compilation