0Pricing
Zig Academy · Lesson

Build for Linux, macOS, and Windows

One toolchain, many platforms.

One Toolchain, Many Platforms

From a single machine you can produce binaries for every major OS. Zig treats cross-builds as first-class, not an afterthought.

Build for Linux

Target Linux by naming its triple. The musl ABI gives you a clean, portable Linux executable from any host.

zig build-exe main.zig -target x86_64-linux-musl

All lessons in this course

  1. Targets and the -target Triple
  2. Build for Linux, macOS, and Windows
  3. Cross-Compiling C with zig cc
  4. Static Binaries and musl
← Back to Zig Academy