Skip to content

feat: migrate to Zig 0.15#6

Merged
lovebaihezi merged 5 commits intomainfrom
refactor-support-zig-0.15.1
Dec 18, 2025
Merged

feat: migrate to Zig 0.15#6
lovebaihezi merged 5 commits intomainfrom
refactor-support-zig-0.15.1

Conversation

@lovebaihezi
Copy link
Copy Markdown
Collaborator

No description provided.

lovebaihezi and others added 3 commits October 11, 2025 08:50
- Fix "Writergate" I/O changes:
  - Update `src/main.zig` to use buffered writer for stdout and explicit flush.
  - Update `scripts/commonmark-test-gen.zig` to use buffered writer and correct flushing.
  - Update `src/mir/*.zig` and `src/xml/lib.zig` to remove internal buffering (relying on caller's buffer) and fix `writer` interface usage.
- Fix API breakages:
  - Replace `std.io.getStdOut` with `std.fs.File.stdout`.
  - Replace `std.fmt.format(writer, ...)` with `writer.print(...)` to work with new `std.io.Writer` interface.
  - Update `std.ArrayList` usage to Unmanaged pattern (passing allocators) in `scripts/commonmark-test-gen.zig` and generated test code.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@lovebaihezi lovebaihezi changed the title fixup: update build.zig feat: migrate to Zig 0.15 Dec 18, 2025
- Removed `scripts/commonmark-test-gen.zig` and the corresponding build step in `build.zig`.
- Verified that `scripts/unicode-generate.zig` and `src/main.zig` are already compatible with Zig 0.15.2:
  - `std.fs.File.writer(buffer)` takes a buffer in 0.15.2.
  - `std.fs.File.stdout()` is available in 0.15.2.
- Verified build success with `zig build` and `zig build test`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@lovebaihezi lovebaihezi marked this pull request as ready for review December 18, 2025 10:08
@lovebaihezi lovebaihezi self-assigned this Dec 18, 2025
@lovebaihezi lovebaihezi merged commit 16c0847 into main Dec 18, 2025
5 of 6 checks passed
@lovebaihezi lovebaihezi deleted the refactor-support-zig-0.15.1 branch December 18, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant