What is Zig?
Zig is a general-purpose programming language and toolchain designed for maintaining robust, optimal, and reusable software. Created by Andrew Kelley, Zig aims to be a better alternative to C, offering modern language features while maintaining the simplicity and performance that systems programmers need.
🔥 Key Features of Zig
⚡ Simple & Fast
No hidden control flow, no hidden memory allocations, no preprocessor. Focus on debugging your application, not your language knowledge.
🔧 Comptime Magic
Compile-time code execution and lazy evaluation. Call any function at compile-time and manipulate types as values without runtime overhead.
🌐 Cross-Compilation
Built-in cross-compilation support for dozens of targets. No external dependencies needed for most platforms.
🔄 C/C++ Interop
Use Zig as a drop-in C/C++ compiler with better cross-compilation. Incrementally adopt Zig in existing codebases.
🆕 What's New in Zig 0.16.0
- I/O as an Interface: All I/O now requires an
Ioinstance, enabling threaded, evented, and async backends - Async & Cancellation: Built-in task concurrency with Futures and Groups, plus standardized cancellation across all I/O operations
- New Metaprogramming Builtins:
@Typereplaced with targeted builtins (@Int,@Struct,@Union,@Enum, etc.) for cleaner generic code - Native Deflate Compression: Built-in deflate compression with zlib-comparable performance and simplified decompression APIs
- Better Stack Traces: Safe stack unwinding across nearly all platforms with improved debug info and inline caller support
- Expanded Target Support: 8+ new architectures in CI including aarch64-freebsd, loongarch64, powerpc64le, and s390x
📦 Installation from debian.griffo.io
Step 1: Add Repository
This repository uses reprepro, which is configured to keep only the latest version of each package. This means older builds are replaced when a new release ships — you cannot pin a specific version with
apt install zig=0.15.2 after 0.16.0 has been published.To let users keep a previous release installed alongside the current one, packages are now named by stability tier:
zig— meta-package, always pulls inzig-stablezig-stable— current stable release (e.g. 0.16.0)zig-oldstable— previous stable release (e.g. 0.15.2), installable alongsidezig-stablezig-0— deprecated, installzig-stableinstead
zig-stable and zig-oldstable register with update-alternatives
so you can switch the active /usr/bin/zig at any time.⬆️ Upgrading to 0.16.0: If you have
zig-0 installed from the old package structure, you must remove it first:Step 2: Install Zig
🎯 Basic Usage Examples
Create a new project:
Compile a single file:
Use as C compiler:
🚀 Why Choose debian.griffo.io?
- ✅ Always Latest: Get Zig 0.15.2 immediately, not months later
- ✅ Nightly Builds: Access cutting-edge features with zig-master package
- ✅ Automatic Updates: Packages updated within hours of upstream releases
- ✅ Proper Dependencies: Correctly packaged with all required dependencies
- ✅ Multi-Distribution: Works on Bookworm, Trixie, and Sid
- ✅ Zero Hassle: No manual compilation or complex setup required
📦 Package Build Repository
The Debian packages are automatically built and maintained in these GitHub repositories:
- 🇿 zig-debian (stable) - Stable release builds
- 🇿 zig-master-debian (nightly) - Nightly development builds
🔗 Related Packages
Also available from debian.griffo.io:
- ZLS Language Server - IDE support for Zig
- Ghostty Terminal - Fast terminal emulator
- Yazi File Manager - Terminal file manager
💝 Support This Project
If this repository saves you time and effort, please consider supporting it!