Rust Cross Compile - One Machine to Six Targets (Linux/Mac/Windows Arm & x86)
Jeremy Chone via YouTube
Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn how to cross-compile a Rust programming binary to six different platforms—Linux, Mac, and Windows on both x86 and ARM architectures—using just one machine in this 12-minute tutorial. Follow along as Jeremy Chone demonstrates the entire process on an Apple Silicon MacBook Pro or Studio. The tutorial covers each target platform step-by-step: Mac ARM (the simplest case), Mac x86, Linux ARM, Linux x86, Windows ARM, and Windows x86. The approach utilizes a Mac/Rust host for both ARM and x86 builds, Docker with ARM and x86 for Linux binaries, and Parallels with Windows 11 ARM for both ARM and Windows x86 executables. The video includes an important correction for the Windows x86 target, recommending the use of x86_64-pc-windows-msvc instead of the 32-bit i686 target. All commands shown in the tutorial are available in a linked GitHub gist for easy reference.
Syllabus
- 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
Taught by
Jeremy Chone