Skip to content
/ zig-ape Public

⚡ All-in-one multiplatform Zig binary

License

Notifications You must be signed in to change notification settings

jcbhmr/zig-ape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ 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!

Installation

Windows Linux macOS

🛑 This is an unofficial redistribution of the Zig binaries. You should probably use the official Zig download page.

  1. Download the ZIP.
  2. Extract it.
  3. Rename it to zig.com or zig.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.

Development

C++ GitHub Actions

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! ️😊