Zig 0.12.0 Rewrites Autodoc and Adds Destructuring
Zig 0.12.0 shipped on April 20, 2024 with a from-scratch WebAssembly-based documentation generator, aggregate destructuring syntax, and a move to LLVM 17.
Historical Archive. This article documents an event from 2024 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
Zig 0.12.0 lands
Zig 0.12.0 was released on April 20, 2024. The release notes describe 8 months of work with changes from 268 different contributors across 3,688 commits, and note that, unlike past releases, the document is abridged, leaving many changes including some breaking API changes unmentioned.
A rewritten Autodoc
The headline was a full rewrite of Autodoc, no longer experimental. The old implementation processed ZIR and shipped about 47 MB of output for the standard library; the new one is a WebAssembly module written in Zig that parses source files directly, reusing the compiler's own tokenizer and parser. Total output dropped to about 12 MB, documentation generation time fell from roughly 13 seconds to about 25 milliseconds, and installations now ship a zig std command that serves the docs on demand rather than bundling them.
Destructuring and stricter var
Zig 0.12.0 added aggregate destructuring, letting you write const x, var y, z = some_tuple to unpack tuples, vectors and arrays into multiple lvalues on the left-hand side. The compiler also gained a new error when a local is declared var but never mutated, prompting you to use const instead, and it deduplicated namespace types based on their source location and captures.
Toolchain and cache
The release moved to LLVM 17, musl 1.2.4 and glibc 2.38. It also renamed the build cache directory from zig-cache to .zig-cache so editors and tooling treat it as ephemeral, and replaced the YES_COLOR environment variable with the more widely used CLICOLOR_FORCE for forcing colored output.
Related on Skillo
See also: Zig 0.11.0 and package management, Zig 0.13.0 and reworked progress.
Sources
Published date reflects the original event date (2024-04-20). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.