Skip to content

upgrade as per zig 0.16.0 io interface#27

Open
anshalshukla wants to merge 1 commit into
mainfrom
anshalshukla/zig-0.16.0
Open

upgrade as per zig 0.16.0 io interface#27
anshalshukla wants to merge 1 commit into
mainfrom
anshalshukla/zig-0.16.0

Conversation

@anshalshukla
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the minimum Zig version to 0.16.0 and migrates the codebase to use the new std.Io interfaces across CID, multihash, and multibase implementations. The changes replace legacy std.io components with std.Io.Reader, std.Io.Writer, and updated file/clock APIs. A technical issue was noted in the benchmarking code where flush() is incorrectly called on the writer's interface rather than the writer object itself.

Comment thread src/multibase_bench.zig
var stdout_buf: [4096]u8 = undefined;
var stdout_writer = std.Io.File.stdout().writer(io, &stdout_buf);
try bench_res.format(&stdout_writer.interface);
try stdout_writer.interface.flush();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The std.Io.Writer interface does not contain a flush method. Since stdout_writer is a bound buffered writer, you should call flush() directly on the writer object itself, rather than through its interface field.

    try stdout_writer.flush();

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