Zig: Build System Reworked
Compilation Speed & New Build System
- Many are excited; Zig already has very fast incremental builds and the reworked system is expected to improve this further.
- Others report slow initial or optimized (
-OReleaseSafe) builds and say “terrific” compile times are aspirational on typical hardware. - Comparisons: some say sub‑50ms recompiles on large codebases are rare outside Zig; others note C/C++ with Ninja/Clang can do ~200ms optimized builds on medium projects.
Developer Experience & Ergonomics
- Several describe Zig as a great “tinkering in the garage” systems language: low-level, explicit, but with modern ergonomics and very readable syntax.
- Others say DX is hurt by strict choices: unused variables are compile errors, no multiline comments, manual handling of interfaces/traits, and relatively tedious string handling.
- Some find these choices interrupt iterative workflows and wish for warnings or opt‑out flags; others defend the strictness as part of Zig’s philosophy of “no magical effects.”
Breaking Changes, Stdlib Churn & 1.0
- Complaints about frequent breaking changes in
build.zigand stdlib APIs (e.g., time, IO) making old projects fail to compile and feeling “disrespected” as users. - Others respond that Zig is explicitly pre‑1.0 and breaking changes are expected; upgrade notes are generally described as good but not always sufficient.
- No firm 1.0 date; core maintainers prioritize getting long‑term design right, even if that slows adoption.
Positioning vs Other Languages
- Python: seen as unmatched for high-level tinkering and ecosystem; Zig is pitched more as a C replacement or for “when Python hits a wall” (performance, embedded, tight binaries).
- Rust: praised for memory safety and large‑scale refactoring; critics say its ergonomics and hidden costs (drops, allocations) can be problematic for real‑time/low‑level work. Zig is viewed as a simpler, more explicit alternative but unsafe.
- Go, Nim, Odin, C#, Lua, etc. appear as alternatives in various niches; some propose “dual‑language” stacks (e.g., Zig + a higher‑level language).
Async I/O & Coroutines
- New IO abstraction is liked for unifying single-threaded, threaded, and evented code with a common style.
- Under the hood it currently uses dynamic dispatch and multiple indirections; some argue overhead is negligible vs syscalls, others say calling it “super efficient” is premature.
- Plans are discussed to reintroduce stackless coroutines and improve devirtualization, making
await-like patterns transparent.
Memory Safety & Suitability for Serious Use
- There is a sharp split: some see Zig’s explicit, unsafe model as acceptable for expert teams and necessary for maximum control/performance.
- Others argue that choosing a non–memory-safe language for new projects is becoming negligent, especially in regulated or high-security contexts, and suggest such software might warrant extra scrutiny.
Bun Rewrite & Ecosystem Signals
- Bun’s move from a Zig fork toward Rust is debated:
- Some attribute it to dev‑experience issues and segfaults slowing iteration.
- Others emphasize acquisition and differing project goals (move fast vs careful low-level control).
- There is disagreement on whether Zig maintainers handled Bun’s attempted large PR well; some see necessary roadmap discipline, others see off-putting rigidity.
Strings, Allocators & RAII
- String handling and pervasive allocator passing are common complaints; many miss RAII‑style,
std::string‑like convenience, especially for non‑critical paths. - Advocates respond that explicit allocators are a core design choice; higher-level RAII wrappers can be built as libraries, but Zig itself won’t add a global allocator.
Licensing & Cross‑Compilation
- Clarification that “MIT (Expat)” refers to the common MIT license variant originating with the Expat XML library.
- Users praise Zig’s glibc targeting and cross‑compile support (e.g., using Zig to generate glibc stubs and cross‑compile C/C++ like ffmpeg), though some wish for more official tooling around these capabilities.