Rust Cross Compile - 1 Machine → 6 Targets (Linux/Mac/Windows Arm & x86) @JeremyChone
Rust Cross Compile - 1 Machine → 6 Targets (Linux/Mac/Windows Arm & x86)  @JeremyChone
Uploaded April 2025 | Updated November 2026, 3 hours ago
Here, I'll show you how to cross-compile a Rust Programming binary to six platforms—Linux, Mac, and Windows, all on x86 and ARM—with just ONE machine.

Correction - Big thanks to @doudeman's comment below, the Windows target should be *x86_64-pc-windows-msvc* and NOT the *i686...*, which is the old 32bit version (see below for the corrected Windows x86 instructions).

Here is the gist with all commands (with the windows x86_64 correction): gist.github.com/jeremychone/5d8af328b67bdd653997e6bd94f67ae0

The machine is an Apple Silicon, MacBook Pro Mx or Studio.

- 00:00 - Intro
- 00:12 - Mac Arm (simplest)
- 01:51 - Mac x86
- 02:31 - Linux Arm
- 04:57 - Linux x86
- 06:04 - Windowx Arm
- 10:33 - Windows x86

This is using:

- Mac/Rust host for both Arm and x86
- Docker with Arm and x86 for the Linux binaries
- And Parallels with Windows 11 Arm for both Arm and Windows x86 .exe

== *Correction for the Windows x86 target*

As noted above, use the *x86_64-pc-windows-msvc* for the x86 64 bit target. The i686... is for old 32 bits target (rarely what we need)

FROM WINDOWS
rustup target add x86_64-pc-windows-msvc
cargo build --release --target x86_64-pc-windows-msvc

FROM MAC HOST
COPYFILE_DISABLE=1 tar -czpf dist/x86_64-pc-windows-msvc/aip.tar.gz -C dist/x86_64-pc-windows-msvc aip.exe
rm dist/x86_64-pc-windows-msvc/aip.exe

I fixed my CI, all work nicely, big thanks @doudeman for the correction.

== Jeremy Chone:

- Join this channel - youtube.com/channel/UCiT_r1GD7JSftnbViKHcOtQ/join
- Member Only Videos - youtube.com/playlist?list=UUMOiT_r1GD7JSftnbViKHcOtQ

- AIPACK: aipack.ai (Built with Rust)
- AI Pack News: news.aipack.ai/archive
- pro coder AI Pack: youtube.com/watch?v=YquLVtXhUvo&list=PL7r-PXl6ZPcBcLsBdBABOFUuLziNyigq

- Twitter - twitter.com/jeremychone
- Discord general-rust - discord.gg/W2besKCzjx
- Discord genai & aipack - discord.gg/6KkpQBKGFS
- AIPACK - aipack.ai (and then 'aip install jc@coder')
- Rust10x - rust10x.com - Rust resources for production coding.
Rust Cross Compile - 1 Machine → 6 Targets (Linux/Mac/Windows Arm & x86)Rust Bevy Tutorial 1/3 - GameDev from Scratch!!!AI Production Coding - Pro/Coder AI Pack DemoLive Coding ➜ MCP Streamable Transport · Part 2RUSTFS - New AWS S3 Compatible Object Storage (from Minio)Rust Programming: The Ultimate Builder Pattern TutorialRust for Java Developers 2/3 - Java 17 side by sideRust Tip - Into String as Function ArgumentsRust Lang Tutorial - if, else, for loopsRust Channels - Patterns and Best PracticesAnimating Custom Charts 2021 - #FrameworkLess - 20 lines code - Native Web ComponentsNative Web Components Dialog Box - Part 2 (bonus: multi-touch drag)
Jeremy Chone |

Rust Cross Compile - 1 Machine → 6 Targets (Linux/Mac/Windows Arm & x86)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER