Skip to content

Part 22. Cross-Platform Development

Windows is one of Zig’s main supported platforms. You can write Zig programs on Windows, build Windows executables, call Windows system APIs, link with C libraries, and...

SectionTitle
1Windows Support
2Linux Support
3macOS Support
4WebAssembly
5ARM and Embedded Targets
6Cross-Target Debugging
7Portable APIs
8Handling Platform Differences
9Packaging Cross-Platform Apps
Windows SupportWindows is one of Zig’s main supported platforms. You can write Zig programs on Windows, build Windows executables, call Windows system APIs, link with C libraries, and...
8 min
Linux SupportLinux is one of the most natural platforms for Zig. Many Zig programs are built, tested, and deployed on Linux because Linux is common in servers, containers, embedded...
8 min
macOS SupportmacOS is one of Zig’s main desktop targets. You can use Zig on macOS to write command-line tools, development utilities, servers, libraries, and cross-platform applications.
7 min
WebAssemblyWebAssembly, often shortened to Wasm, is a portable binary instruction format. It lets you compile code once and run it inside different hosts, such as web browsers, servers,...
7 min
ARM and Embedded TargetsARM is a CPU architecture family used in phones, tablets, laptops, routers, Raspberry Pi boards, microcontrollers, servers, and many embedded devices. When you write Zig for...
8 min
Cross-Target DebuggingCross-target debugging means debugging a program built for a different machine, operating system, or CPU architecture than the one you are sitting at.
8 min
Portable APIsA portable API is an interface that works across more than one platform.
7 min
Handling Platform DifferencesA cross-platform Zig program should not pretend that every operating system behaves the same way. Windows, Linux, macOS, WebAssembly, and embedded targets have different...
7 min
Packaging Cross-Platform AppsPackaging means preparing your program so other people can download it, install it, run it, and trust what they are running.
6 min