Skip to content
HN On Hacker News ↗

0.17.0 Release Notes ⚡ The Zig Programming Language

▲ 278 points • 208 comments • by ErenayDev • 1w ago • HN discussion ↗

Pangram verdict · v3.3

We believe that this entire text is human-written.

0 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 1 of 1
SEGMENTS · AI 0 of 1
WORD COUNT 1,712
PEAK AI % 0% · §1
Analyzed
Oct 2
backend: pangram/v3.3
Segments scanned
1 windows
avg 1712 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 1,712 words · 1 segments analyzed

Human AI-generated
§1 Human · 0%

Download & Documentation Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. Zig development is funded via Zig Software Foundation, a 501(c)(3) non-profit organization. Please consider a recurring donation so that we can offer more billable hours to our core team members. This is the most straightforward way to accelerate the project along the Roadmap to 1.0. If you need donation receipts or are looking to migrate away from GitHub Sponsors, we recommend donating via Every.org. This release features 5 months of work: changes from 206 different contributors, spread among 925 commits. Originally predicted to be shorter, this release cycle ended up substantial, with the Build System reworked, including the introduction of the Build Server Protocol, and the ELF Linker enhanced to the point where we expect Incremental Compilation to work for everyone on x86_64-linux. Table of Contents § Table of Contents Target Support Tier System Tier 1 Tier 2 Tier 3 Tier 4 Support Table OS Version Requirements Additional Platforms Language Changes Language Stability Progress @bitCast changes Formally Specified and Fuzzed Grammar C Translation Moving to External Package Added @backingInt and @fromBackingInt Added @SpirvType Array Multiplication Syntax Removed Added @divCeil @hasDecl Returns true Only for Public Declarations Allow Dereference and Coercion to Array Pointer of comptime Length Slices void{} Syntax Removed errdefer Capture Removed i0 Removed internal and link_once Global Linkage Removed Standard Library Deprecations StackFallbackAllocator Reworked SafeAllocator Introduced ArrayList ArrayList Pointer Stability debug.SafetyLock Gains Support for Shared Locking fmt.allocPrint moved to mem.Allocator Formatted Printing Enhancements std.zon.parse Reworked Rename bit_set Variants and Deprecate the Managed One Struct-Of-Arrays Style for std.lang.Type Rename lang.OptimizeMode to lang.Optimize lang.Optimize.runtimeSafety @import("builtin") Deprecations Handle Floats Correctly in mem.eql and mem.findDiff Decouple Uri and net.HostName Build System Separate the Maker Process from the Configurer Process Cache System Reworked Introduce the Concept of Configure Cache Poisoning findProgram findProgramLazy Run Step: Passthru Args Fmt Step: Options Step.Options: add addOptionPathDirectory Lazy Dependency Ergonomic Enhancements Removed Ability to Override Build Runner Package Management Ability to Override Package Path Global vs Local Fetching Slight Difference in PATH for DLL Arguments Build Server Protocol Compiler Incremental Compilation SPIR-V Backend aarch64 Backend loongarch Backend WebAssembly Backend Linker ELF COFF New Linker Testing Framework SPIR-V Fuzzer Bug Fixes This Release Contains Bugs Notable Regressions Toolchain LLVM 22 Loop Vectorization Disabled to Work Around Regression musl 1.2.5 glibc 2.44 Linux 7.2 Headers macOS 27.0 Headers MinGW-w64 NetBSD 11.0 libc OpenBSD 7.9 libc WASI libc zig libc zig cc zig objdump resinator Windows Resource Compilation Moving to an External Package zig fmt Added --complexity Flag Roadmap Thank You Contributors! Thank You Sponsors! Target Support § Zig supports a wide range of architectures and operating systems. The Support Table and Additional Platforms sections cover the targets that Zig can build programs for, while the zig-bootstrap README covers the targets that the Zig Compiler itself can be easily cross-compiled to run on. Notable changes: aarch64-openbsd is now tested natively in Zig's CI, ensuring high-quality support going forward. aarch64-freebsd and aarch64-netbsd CI jobs now run on pull requests too, in addition to master pushes. An LLVM bug that broke most aarch64-windows binaries, including the Zig Compiler, has been worked around. The Zig Compiler now applies mandatory code hardening techniques when targeting aarch64-openbsd so that the resulting binaries actually work. Zig now provides stack traces on crashes and failed assertions on 32-bit ARM. Some work still remains for Thumb-only targets. Zig now provides stack traces on crashes and failed assertions on SPARC. Zig now handles pointer authentication opcodes when doing stack unwinding on AArch64. Support for the loongarch32-linux-gnu[sf] targets has been added. Zig now has generally usable support for 64-bit SPARC, and especially sparc64-linux. This is largely thanks to Zig's new ELF linker which now has better support for this target than LLD. The Zig Standard Library has been ported to the x32 and N32 ABIs on x86-64 and 64-bit MIPS, respectively. These are niche ILP32 ABIs that allow using the 64-bit instruction set while only having 32-bit pointers - the idea being to trade available address space for lower memory usage and better cache utilization. Target information has been added for some game consoles: aarch64-switch, arm-gba, mipsel-psx, and powerpc-wiiu Very early xtensa-linux support has been added to Zig. Note that, for now, this support can only be exercised via the C backend or the experimental LLVM backend. The Zig Standard Library now has support for arc[eb]-linux, csky-linux, and m88k-openbsd when using the C backend. The Zig Standard Library now has support for no-libc microblaze[el]-linux, sh[eb]-linux, and sparc-linux. Zig now enforces -mabi=ieeelongdouble for all PowerPC targets. This is just a formalization of what was already reality; Zig has never supported the IBM "double-double" format for long double and likely never will. As a result, this release drops support for powerpc-linux-gnueabi[hf] because glibc only supports the "double-double" format on these targets. The powerpc-linux-musleabi[hf] targets remain supported as they use the IEEE format. This release drops support for powerpc64-linux-gnu. Zig has only ever supported linking ELFv2 binaries for 64-bit PowerPC, and glibc does not officially support ELFv2 on big endian - nor IEEE long double, as above. Zig's ability to detect the native CPU model and features has been greatly enhanced across the board; this affects almost every architecture on every supported OS. The baseline CPU model has been changed for some targets: aarch64-haiku: cortex_a55 m68k-*: M68030 mips64-openbsd: octeon powerpc-netbsd: 750 powerpc64-freebsd: pwr8 powerpc64-linux: pwr8 powerpc64-openbsd: pwr9 s390x-*: arch11 sparc-*: generic sparc-linux: v9 sparc64-*: ultrasparc xtensa-*: esp32 In Zig's target query syntax, native libc version detection now only happens if the triple actually uses native libc (i.e. the ABI component is omitted). We expect this new behavior to better match people's mental model for how target queries work, particularly when considering how the OS component works. Tier System § Zig's level of support for various targets is broadly categorized into four tiers with Tier 1 being the highest. The goal is for Tier 1 targets to have zero disabled tests - this will become a requirement for post-1.0.0 Zig releases. Tier 1 § All non-experimental language features are known to work correctly. The Compiler can generate machine code for this target without relying on LLVM. The integrated fuzzer works on this target (if applicable). Tier 2 § The Standard Library cross-platform abstractions have implementations for this target. Failed assertions and crashes produce stack traces on this target. libc is available for this target even when cross-compiling (if applicable). Continuous integration machines build the module tests for this target on every push. Tier 3 § The Compiler can generate machine code for this target by relying on an external backend such as LLVM. The Linker can produce object files, libraries, and executables for this target. Tier 4 § The Compiler can generate assembly or C source code for this target. Support Table § In the following table, ✅ indicates full support, ❌ indicates no support, and ⚠ indicates that there is partial support, e.g. only for some sub-targets, or with some notable known issues. ❔ indicates that the status is largely unknown, typically because the target is rarely exercised. Hover over other icons for details. Targets marked with 🪦 are obsolescent; the Zig compiler and standard library maintain best-effort support for them, but that support is expected to be removed eventually. Tier Target Code Gen. Linker Lang. Feat. Std. Lib. Stack Traces Fuzzer libc CI 1 x86_64-linux 🖥⚡ ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 aarch64-freebsd 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 aarch64[_be]-linux 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 aarch64-maccatalyst 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 aarch64-macos 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 aarch64[_be]-netbsd 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 aarch64-openbsd 🖥🛠 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 aarch64-windows 🖥🛠 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 arm-freebsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 arm[eb]-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 arm[eb]-netbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 arm-openbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 hexagon-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 loongarch32-linux 🖥🛠 ✅ ❔ ✅ ✅ ❌ ✅ ⚠ 2 loongarch64-linux 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 mips[el]-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 mips[el]-netbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 mips64[el]-linux 🖥 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 mips64[el]-openbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 powerpc-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 powerpc-netbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 powerpc-openbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 powerpc64[le]-freebsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 powerpc64[le]-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 powerpc64-openbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 riscv32-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 riscv32-netbsd 🖥 ✅ ✅ ✅ ✅ ✅ ✅ ⚠ 2 riscv64-freebsd 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ⚠ 2 riscv64-linux 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 riscv64-netbsd 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ⚠ 2 riscv64-openbsd 🖥🛠 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 s390x-linux 🖥 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 sparc64-linux 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 thumb[eb]-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 wasm32-wasi 🖥🛠 ✅ ✅ ✅ ⚠ ❌ ✅ ✅ 2 x86-linux 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 x86-netbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 x86-openbsd 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ⚠ 2 🪦 x86-windows 🖥 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 x86_64-freebsd 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 🪦 x86_64-maccatalyst 🖥⚡ ✅ ✅ ✅ ✅ ✅ ✅ ⚠ 2 🪦 x86_64-macos 🖥⚡ ✅ ✅ ✅ ✅ ✅ ✅ ⚠ 2 x86_64-netbsd 🖥🛠 ✅ ✅ ✅ ✅ ✅ ✅ ✅ 2 x86_64-openbsd 🖥🛠 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 2 x86_64-windows 🖥🛠 ✅ ✅ ✅ ✅ ❌ ✅ ✅ 3 aarch64-haiku 🖥🛠 ✅ ✅ ✅ ✅ ❔ ❌ ❌ 3 aarch64-ios 🖥🛠 ✅ ✅ ✅ ✅ ❌ ❌ ❌ 3 aarch64-serenity 🖥🛠 ✅ ✅ ✅ ✅ ❔ ❌ ❌ 3