Skip to content

fix: Zig 0.16.0 compatibility#1

Open
zclawz wants to merge 2 commits intomasterfrom
feat/zig-0.16.0
Open

fix: Zig 0.16.0 compatibility#1
zclawz wants to merge 2 commits intomasterfrom
feat/zig-0.16.0

Conversation

@zclawz
Copy link
Copy Markdown

@zclawz zclawz commented Apr 24, 2026

Fixes Zig 0.16.0 build failure.

Problem

std.Build.Cache.Directory.cwd().handle.realpathAlloc no longer exists in Zig 0.16.0 — realpathAlloc was removed from Io.Dir.

Fix

Replace with b.allocator.dupe(u8, proto_path). This is safe because proto_path is obtained from LazyPath.getPath3(b, step).toString(b.allocator), which already returns an absolute path — the realpathAlloc call was only resolving symlinks/normalising, which is not needed in the build step context.

Also bumps minimum_zig_version to 0.16.0.

@anshalshukla anshalshukla changed the title fix: replace realpathAlloc with dupe for Zig 0.16.0 compatibility fix: Zig 0.16.0 compatibility Apr 24, 2026
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.

2 participants