0PricingLogin
Zig Academy · Lesson

Targets and the -target Triple

Name the OS, arch, and ABI.

Cross-Compiling Is Built In

Zig ships every supported target inside the compiler, so cross-compilation needs no extra toolchains or downloads to begin.

The Target Triple

You name a target with a triple: it spells out the CPU architecture, the operating system, and the ABI in one string.

x86_64-linux-gnu

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