0.9.1 Release Notes
Download & Documentation
Zig is a general-purpose programming language and toolchain for maintaining
robust, optimal, and reusable software.
Backed by the Zig Software Foundation,
the project is financially sustainable and offers billable hours for
core team members:
Please consider a recurring donation to the ZSF
to help us pay more contributors!
This release contains only bug fixes.
A green check mark (✅) indicates the target meets all the requirements for the
support tier. The other icons indicate what is preventing the target from
reaching the support tier. In other words, the icons are
to-do items. If you find any wrong data here please
submit a pull request!
- Not only can Zig generate machine code for these targets, but the standard
library cross-platform abstractions have implementations for these targets.
- 🧪 The CI server automatically tests these targets on every commit to master
branch.
- 📦 The CI server automatically produces pre-built binaries for these targets,
on every commit to master, and updates
the download page with links.
- These targets have debug info capabilities and therefore produce stack traces
on failed assertions.
- libc is available for this target even when cross compiling.
- 🐛 All the behavior tests and applicable standard library tests pass for this target.
All language features are known to work correctly. Experimental features do not
count towards disqualifying an operating system or architecture from Tier 1.
zig cc
, zig c++
and related toolchain commands support
this target.
- 💀 If the Operating System is proprietary then the target is not marked deprecated
by the vendor,
such as macos/x86.
|
freestanding |
Linux 3.16+ |
macOS 10.13+ |
Windows 8.1+ |
WASI |
x86_64 |
✅ |
✅ |
✅ |
✅ |
N/A |
x86 |
✅ |
#1929 🐛📦 |
💀 |
#537 🐛📦 |
N/A |
aarch64 |
✅ |
#2443 🐛 |
✅ |
🐛📦🧪 |
N/A |
arm |
✅ |
#3174 🐛📦 |
💀 |
🐛📦🧪 |
N/A |
mips |
✅ |
#3345 🐛📦 |
N/A |
N/A |
N/A |
riscv64 |
✅ |
#4456 🐛📦 |
N/A |
N/A |
N/A |
sparcv9 |
✅ |
#4931 🐛📦🧪 |
N/A |
N/A |
N/A |
wasm32 |
✅ |
N/A |
N/A |
N/A |
✅ |
- 📖 The standard library supports this target, but it's possible that some
APIs will give an "Unsupported OS" compile error. One can link with libc or other
libraries to fill in the gaps in the standard library.
- 🔍 These targets are known to work, but may not be automatically tested, so there
are occasional regressions.
- Some tests may be disabled for these targets as we work toward
Tier 1 Support.
|
free standing |
Linux 3.16+ |
macOS 10.13+ |
Windows 8.1+ |
FreeBSD 12.0+ |
NetBSD 8.0+ |
DragonFlyBSD 5.8+ |
UEFI |
x86_64 |
Tier 1 |
Tier 1 |
Tier 1 |
Tier 1 |
✅ |
✅ |
✅ |
✅ |
x86 |
Tier 1 |
✅ |
💀 |
✅ |
🔍 |
🔍 |
N/A |
✅ |
aarch64 |
Tier 1 |
✅ |
Tier 1 |
🔍 |
🔍 |
🔍 |
N/A |
🔍 |
arm |
Tier 1 |
✅ |
💀 |
🔍 |
🔍 |
🔍 |
N/A |
🔍 |
mips64 |
✅ |
✅ |
N/A |
N/A |
🔍 |
🔍 |
N/A |
N/A |
mips |
Tier 1 |
✅ |
N/A |
N/A |
🔍 |
🔍 |
N/A |
N/A |
powerpc64 |
✅ |
📖 |
💀 |
N/A |
🔍 |
🔍 |
N/A |
N/A |
powerpc |
✅ |
✅ |
💀 |
N/A |
🔍 |
🔍 |
N/A |
N/A |
riscv64 |
Tier 1 |
✅ |
N/A |
N/A |
🔍 |
🔍 |
N/A |
🔍 |
sparcv9 |
Tier 1 |
✅ |
N/A |
N/A |
🔍 |
🔍 |
N/A |
N/A |
- The standard library has little to no knowledge of the existence of this
target.
- If this target is provided by LLVM, LLVM has the target enabled by default.
- These targets are not frequently tested; one will likely need to contribute
to Zig in order to build for these targets.
- The Zig compiler might need to be updated with a few things such as
- what sizes are the C integer types
- C ABI calling convention for this target
- start code and default panic handler
zig targets
is guaranteed to include this target.
|
freestanding |
emscripten |
wasm32 |
Tier 1 |
✅ |
- Support for these targets is entirely experimental.
- If this target is provided by LLVM, LLVM may have the target as an
experimental target, which means that you need to use Zig-provided binaries
for the target to be available, or build LLVM from source with special configure flags.
zig targets
will display the target if it is available.
- This target may be considered deprecated by an official party,
such as macosx/i386 in which
case this target will remain forever stuck in Tier 4.
- This target may only support
-femit-asm
and cannot emit object files
(-fno-emit-bin
enabled by default and cannot be overridden).
Tier 4 targets:
- avr
- riscv32
- xcore
- nvptx
- msp430
- r600
- arc
- tce
- le
- amdil
- hsail
- spir
- kalimba
- shave
- renderscript
- 32-bit x86 macOS, 32-bit ARM macOS, powerpc32 and powerpc64 macOS,
because Apple has officially dropped support for them.
This release of Zig upgrades to
LLVM 13.0.1 which
fixed a handful of bugs, including regressions introduced in LLVM 13.0.0. At time of
writing, this hyperlink 404s because LLVM project did not provide release notes for this
version.
- Fixed access of slice sentinel at comptime.
- Fixed
@errorName
null termination.
- cmake: fix
-DZIG_SINGLE_THREADED
option.
- cmake: fixed build failure due to missing LLD library.
- Fixed LLVM C ABI type resolution for small packed structs.
- WebAssembly linker: place stack at the beginning of the linear memory (#10572).
- WebAssembly linker: only export symbols notated as to be exported (#2910) (#7133).
- Fixed bigint_init_bigfloat for single-limb negative floats (#10592).
- MachO linker: align the code signature to 16 bytes.
- MachO linker: a couple of fixes which result in better rustc support (#10584).
- MachO linker: fixed putting cache identifier in the wrong directory.
- No longer interpret identifier containing underscores (eg:
u3_2
) as int primitive type.
- Fixed handling of ZEROFILL (.bss) sections.
- Removed the bogus "referenced here" error notes.
- ELF, COFF, WASM linkers: honor the
must_link
flag of positionals.
Previously, only the MachO linker was honoring the flag.
- build script: fix single-threaded option.
- Fixed x86 i128 C ABI for extern structs (#10834).
- Added missing include directory for Haiku.
zig fmt
: handle doc comments on struct members (#10443).
- Fixed slow debug info due to checking the file's length more than once in
pdb.Msf
.
- testing: fixed
expectStringEndsWith
error output.
- Added missing BSD Authentication constants (#10376).
- Fixed
mem.zeroes
not handling comptime struct fields (#9934).
- fmt: fixed typo in deprecation error for
E
format specifier where it would instead complain about a specifier of X
. Also improved the @compileError
message.
- fmt: fixed slow comptime format string parsing.
- io_uring: fixed version check in tests. For renameat, unlinkat, mkdirat, symlinkat and linkat the error code differs between kernel 5.4 which returns EBADF and kernel 5.10 which returns EINVAL (#10466).
- io_uring: improve robustness of
IO_Uring.copy_cqe
.
- Add CANNOT_DELETE as a possible error in os.windows.DeleteFile.
- hash_map: optimize isFree/isTombstone (#10562).
- os.uefi miscellaneous fixes (#10566).
- Fixed a bug in std.Thread.Condition (#10538).
- Use libc
if_nametoindex
for macOS when parsing IPs (#10576).
- Fixed
MultiArrayList.insert
compile error.
- Fixed
os.rusage
when linking with c library on Linux (#10543).
- Fixed missing segfault handler for macOS x86_64 and aarch64.
- Added missing termios types to
c.linux
and os
.
- fs.getAppDataDir: added missing check for
XDG_DATA_HOME
.
io.Reader.readUntilDelimiter
: fixed functions losing last byte if it is past the max size (#9594).
- Fixed duplicate TLS startup symbols when linking libc on Windows.
- crypto.random: fixed no-longer-necessary pass-by-reference.
- Fixed startup procedure for async WinMain.
- fchown: use the 32-bit uid/gid variant of the syscall on 32-bit linux targets.
- break up some long lines. This makes packaging Zig for Debian slightly easier since it will no longer trigger a Lintian warning for long lines.
- fmt: fix out-of-bounds array write in float printing.
- Fixed overflow in std.math.isNormal when applied to -Inf or a negative NaN.
- Fixed
process.argsAlloc
buffer size.
fs.Dir.Iterator
: fixed iterating twice.
- debug: fixed edge cases in macOS debug symbol lookup.
- fmt: corrected rounding in parse_hex_float.zig (#10743).
- Fixed
mem.zeroes
to work at comptime with extern union (#10797).
- Fixed i386-openbsd failing to build from source (#9705).
- child_process: fixed deadlock reading from child process stdout/stderr on Windows (#10813).
- Fixed
RwLock
compile error (#10838).
- Fixed preadv/pwritev bug on 64bit platform.
- Handle typedef'ed void return type for functions (#10356).
- Fixed macro define of float constant using scientific notation.
- Fixed issues translating macro define of hex float constant.
- libcxx: fixed not building fs/filesystem when targeting Windows.
- libcxx: fixed duplicate
__muloti4
symbol.
- Integration with
--sysroot
parameter (#10568).
- Integration with
--entry
parameter (#10475).
- Integration with
--whole-archive
, --no-whole-archive
,
--strip-all
, and --strip-debug
parameters.
- Integration with
--hash-style
parameter.
- Fixed a bug where passing a zig source file to
zig cc
would
incorrectly punt to clang because it thought there were no positional arguments.
- Integration with CUDA source files (#10634).
- Improved a warning message for some cases of using
zig run -lc++
.
- Ignore
-lgcc_s
when it is redundant with compiler-rt.
- Fixed Linux headers being named
arm64
instead of aarch64
(#10699).
- glibc: fixed passing of
__GNU_MINOR__
.
- glibc: fixed compatibility with glibc <= 2.33 for global initializers (#10587).
- glibc: fixed
MINSIGSTKSZ
on glibcs older than 2.34 (#10713).
- Replaced mentions of
c_void
with anyopaque
.
- Mention the
root
source package.
- Added documentation for implicit struct pointer dereferencing.
- Fixed precedence in
or
example.
- Reorganized
@truncate
and @intCast
for clarity.
- Correction: declarations in
@typeInfo
will always be in the same order
as they appear in the source code.
Zig has
known bugs
and even some
miscompilations.
Zig is immature. Even with Zig 0.9.1, working on a non-trivial project using Zig will
likely require participating in the development process.
When Zig reaches 1.0.0, a new requirement for Tier 1 Support will be
0 known bugs for that target.
This is the final planned release in the 0.9.x branch.
These release notes have been edited down to avoid excessive detail as to not overwhelm
the reader with content. In order to make sure everyone gets credit who contributed, here
is a list of everyone who landed commits during this release cycle (produced with
git shortlog -sne 0.9.0..0.9.1
):
- Andrew Kelley
- Jakub Konka
- John Schmidt
- riverbl
- Daniel Saier
- Evan Haas
- Jonathan S
- Vincent Rischmann
- r00ster
- Al Hoang
- Ali Chraghi
- C-BJ
- Dante Catalfamo
- Exonorid
- Frank Denis
- Jean Dao
- Jimmi Holst Christensen
- Jonathan Marler
- Josh Hannaford
- Kazuki Sakamoto
- Kirk Scheibelhut
- Marc Tiehuis
- Marian Beermann
- Meghan Denny
- Pablo Santiago Blum de Aguiar
- Philipp Lühmann
- Ryan Liptak
- Sizhe Zhao
- Stephen Lumenta
- Tom Manner
- Tw
- Veikka Tuominen
- Vesim
- afranchuk
- billzez
- boofexxx
- djg
- fifty-six
- joachimschmidt557
- johnLate
- ominitay
- praschke
- vnc5
Special thanks to those who sponsor Zig.
Because of you, Zig is driven by the open source community, rather than the goal of making profit.
In particular, these fine folks sponsor Zig for $50/month or more: