mattrobenolt / mattrobenolt/zig-benchmark
Zig 0.16 compatibility: std.process.args and std.time.Timer removed
Nobody has claimed this yet.
- Dominant language
- Zig
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Problem
The benchmark library doesn't compile under Zig 0.16 due to two std API changes:
std.process.args()→ removed; args are now passed viastd.process.Inittomain(init: std.process.Init)std.time.Timer→ removed/restructured
src/benchmark_main.zig uses std.process.args() and src/benchmark.zig uses std.time.Timer.
Impact
ztls can't build zig build bench-bin under Zig 0.16. This blocks perf captures under 0.16 (ztls #62).
Fix needed
benchmark_main.zig: conditionally acceptstd.process.Initunder 0.16 (via `@hasDecl(std.process, "Init"))benchmark.zig: replacestd.time.Timerwith the 0.16 equivalent or a dual-version shimOptions.parse/nextFlagValue/shortFlagValue: change*std.process.ArgIteratortoanytype(both ArgIterator and Args.Iterator have.next()/.skip())
The ztls project pins this library at 6e7e9ab. Once fixed, update the hash in ztls build.zig.zon.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/benchmark_main.zig and src/benchmark.zig, then trace Options.parse, nextFlagValue, and shortFlagValue to understand the iterator interfaces. Build with Zig 0.16 using zig build bench-bin and verify the benchmark library remains compatible with the existing API; once it works, the ztls build.zig.zon hash can be updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- zig
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100