Zig as an Actually Portable Executable
⚡ All-in-one multiplatform Zig binary
wget https://github.com/jcbhmr/zig-ape/releases/download/0.13.0/zig-ape-0.13.0.zip
unzip zig-ape-0.13.0.zip
./zig-ape-0.13.0/zig zen |
🌌 Uses cosmocc
to build a multiplatform binary
📂 Extracts the platform-specific zig
and lib/*
files to a cache folder
💻 Works on Windows, macOS, and Linux on both x86-64 & AArch64 CPUs
😎 It's just one binary!
🛑 This is an unofficial redistribution of the Zig binaries. You should probably use the official Zig download page.
- Download the ZIP.
- Extract it.
- Rename it to
zig.com
orzig.exe
. (Windows only)
https://github.com/jcbhmr/zig/releases/download/0.13.0/zig-ape-0.13.0.zip
The all-in-one binary should work on Windows x86-64, Windows AArch64, macOS x86-64, macOS AArch64, Linux x86-64, Linux AArch64, and FreeBSD x86-64. For other platforms make sure you check out Zig's official download page.
The GitHub actions workflow doesn't actually build Zig itself. That's too complex. Instead, it pulls the precompiled artifacts from the Zig downloads page and bundles them into a single ZIP archive.
TODO: I need some assistance in handling non-zero exit codes and process signals properly in Windows. If anyone reading this knows how to waitpid()
correctly please enlighten me! ️😊