Zig ELF Linker Improvements Devlog
The Zig programming language is making improvements by preferring native APIs over the traditional Win32 APIs on Windows. This shift aims to reduce unnecessary overhead and improve performance by avoiding issues associated with kernel32.dll. Two examples illustrate how Zig is optimizing random byte generation and file reading/writing operations.
- ▪Zig's standard library policy emphasizes using the native API over Win32 to enhance efficiency.
- ▪The reliance on kernel32.dll introduces unnecessary heap allocations and potential failure modes.
- ▪Zig has made significant progress in reducing calls to kernel32.dll, particularly in random number generation and file operations.
Opening excerpt (first ~120 words) tap to expand
February 03, 2026 Bypassing Kernel32.dll for Fun and Nonprofit Author: Andrew KelleyThe Windows operating system provides a large ABI surface area for doing things in the kernel. However, not all ABIs are created equally. As Casey Muratori points out in his lecture, The Only Unbreakable Law, the organizational structure of software development teams has a direct impact on the structure of the software they produce.The DLLs on Windows are organized into a heirarchy, with some of the APIs being high-level wrappers around lower-level ones. For example, whenever you call functions of kernel32.dll, ultimately, the actual work is done by ntdll.dll.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Ziglang.