Zig ELF Linker Improvements Devlog
Zig's new ELF linker now supports fast incremental compilation with external libraries on x86_64 Linux.
Matthew Lugg reports that Zig's new ELF linker, introduced in version 0.16.0 as an opt-in feature, has progressed significantly. It can now build the self-hosted Zig compiler with LLVM and LLD libraries enabled. The headline feature is fast incremental compilation: rebuilds complete in 30ms to 288ms, even when linking external libraries and C sources. On the Zig compiler itself, initial builds take 36 seconds but subsequent changes rebuild in 200-300ms.
The devlog also covers Andrew Kelley's reworked build system that separates configuration (compiling build.zig files) from execution. This makes `zig build --help` 90% faster (150ms to 14ms) by caching the serialized configuration and compiling the build runner with optimizations. Missing features include DWARF debug information support. The linker remains disabled by default; users enable it with `-fnew-linker`.
What HN community is saying
Commenters expressed enthusiasm, with top responses celebrating the milestone and comparing it to long-standing compiler design goals. One contributor clarified that this work predates recent industry drama and has been underway since 2020. Discussion turned to Zig's broader viability as a C replacement, with skeptics noting that memory control requirements and allocator decisions prevent JavaScript-like iteration speeds despite fast compilation. A contributor noted Windows COFF linker improvements are in progress but may not land in 0.17.0.