Upgrade zig 0.16.0 - #2
Merged
Merged
Conversation
Zig 0.16 removed `Compile.linkLibC()`; libc is now a module property, so set `.link_libc = true` on the `plotille-c` module instead of calling it on the static and shared library artifacts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Zig 0.16 removed `std.io`. Replace `std.io.fixedBufferStream` with `std.Io.Writer.fixed` and `std.fmt.format(w, ...)` with `w.print(...)`; `getWritten`/`pos`/`reset` become `buffered()`/`end`. `ArrayList` lost its default field values and its `writer()` helper, so initialise with `.empty` and print via `list.print(gpa, ...)`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Zig 0.16 removed `std.posix.isatty` and the global env-var helpers, so `TermInfo.detect` can no longer reach stdout or the environment on its own. BREAKING CHANGE: `TermInfo.detect(allocator)` becomes `TermInfo.detect(io, environ, allocator)`. Callers pass `init.io` and `init.minimal.environ` from `std.process.Init`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Write into a `std.Io.Writer.fixed` buffer instead of a fixed buffer stream, and swap the removed `GeneralPurposeAllocator` for the c allocator. `get_terminfo` has no `std.process.Init` to draw from, so it uses the hardcoded single-threaded `Io` and reads the environment block from libc. The exported C signatures are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Zig 0.16 hands I/O, the arena, args and the environment to `main` via `std.process.Init`, replacing `argsAlloc` and the hand-rolled arena. stdout becomes a buffered `Io.File.Writer` that is flushed on exit, and stdin is read through `readerStreaming` + `allocRemaining`. In lookup.zig, drop the per-call throwaway stdout writers and reuse the single writer; with buffering they would interleave incorrectly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Bump the version badge and show the new `TermInfo.detect` signature. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tammoippen
commented
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Highlights
Breaking change
std. posix.isatty and the global env-var helpers were removed, so terminal detection needs I/0 and the environment passed in:
The exported C API signatures are unchanged -
get_terminfosources both internally.