Zig 0.16 Notes โ
This project targets exactly Zig 0.16.0; the SDK source is the authority, not memory of older versions.
- Allocators:
std.mem.Allocatorinterface fromlib/std/mem/Allocator.zig;DebugAllocator,ArenaAllocator,FixedBufferAllocator,SmpAllocatorfromstd.heap. - Lists: unmanaged
std.ArrayList(T)โ.empty, methods takinggpaexplicitly (append(gpa, x),deinit(gpa)). - Maps: managed
StringHashMap/AutoHashMap(.init(gpa)/.deinit()). - I/O: new
std.Io(Io.Reader.readSliceShort,Io.Timestamp,Io.Writer.print); debug output viastd.debug.print. No legacystd.iousage. - Text:
std.asciipredicates,std.mem.sortwith context comparators,std.StaticBitSet/DynamicBitSetUnmanaged. - Testing:
std.testing.allocator,failing_allocator,checkAllAllocationFailures-style failure injection. - Build:
b.addModule/createModule/addTest/addExecutablewithroot_module,addRunArtifact,getEmittedDocs,addInstallDirectory. - Time: monotonic clock via
std.Io.Timestamp.now(io, .awake)โstd.timeno longer hosts wall-clock helpers.
When in doubt, read C:\tools\zig-x86_64-windows-0.16.0\lib\std\ before assuming an API exists.
Related: Compatibility: Zig.
