Skip to content

Update Zig compatibility from 0.15.2 to 0.16.0#224

Closed
jsmestad wants to merge 3 commits into
burrito-elixir:mainfrom
jsmestad:zig-0.16.0
Closed

Update Zig compatibility from 0.15.2 to 0.16.0#224
jsmestad wants to merge 3 commits into
burrito-elixir:mainfrom
jsmestad:zig-0.16.0

Conversation

@jsmestad

@jsmestad jsmestad commented May 29, 2026

Copy link
Copy Markdown

Addresses #221

The Zig standard library had a major restructuring in 0.16.0, primarily around the new Io abstraction. This updates all source files to use the new APIs:

  • std.process.getEnvVarOwned → b.graph.environ_map.get (build.zig) and std.process.Environ (runtime)
  • std.fs.cwd() → std.Io.Dir.cwd()
  • File methods (close, stat, writer, reader) now take io: Io parameter
  • std.fs.getAppDataDir removed; replaced with manual XDG/platform logic
  • std.process.execve → std.process.replace
  • Build module methods (addIncludePath, addCSourceFile, linkSystemLibrary) moved from Compile step to root_module
  • main() accepts std.process.Init for Io and Environ access

Brezn and others added 2 commits May 29, 2026 12:12
The Zig standard library had a major restructuring in 0.16.0, primarily
around the new Io abstraction. This updates all source files to use the
new APIs:

- std.process.getEnvVarOwned → b.graph.environ_map.get (build.zig) and
  std.process.Environ (runtime)
- std.fs.cwd() → std.Io.Dir.cwd()
- File methods (close, stat, writer, reader) now take io: Io parameter
- std.fs.getAppDataDir removed; replaced with manual XDG/platform logic
- std.process.execve → std.process.replace
- Build module methods (addIncludePath, addCSourceFile, linkSystemLibrary)
  moved from Compile step to root_module
- main() accepts std.process.Init for Io and Environ access

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@doawoo

doawoo commented May 29, 2026

Copy link
Copy Markdown
Contributor

Thanks for the assist, I was 90% though my own refactor but you beat me to the punch, give me some time to review and look at CI :)

@gilbertwong96

Copy link
Copy Markdown

Hi, @doawoo , I encountered the issue #221 too, any update ?

@jsmestad

Copy link
Copy Markdown
Author

Using #225 instead 👍

@jsmestad jsmestad closed this Jun 25, 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.

3 participants