Skip to content

feat!: port zbuild to Zig 0.17 - #10

Open
wemeetagain wants to merge 1 commit into
mainfrom
fix/zig-0.17
Open

wemeetagain wants to merge 1 commit into
mainfrom
fix/zig-0.17

Conversation

@wemeetagain

Copy link
Copy Markdown
Member

Zig 0.17 removes APIs and syntax used throughout zbuild, preventing the library from compiling. This ports zbuild to Zig 0.17 only and updates package requirements, examples, documentation, and CI. Manifest optimization modes are now .debug, .safe, .fast, and .small.

  • Migrate struct reflection and dependency argument construction to the new field arrays, and replace array repetition with @splat.
  • Implement help as a generated host executable, forward runtime arguments with addPassthruArgs, and convert formatter paths to LazyPath lists.
  • Preserve no_builtin = false behavior by omitting the invalid -fno-no-builtin flag produced by Zig 0.17.0; retain coverage for both boolean values.
  • Check generated dependency configuration at make time so fixtures remain valid when configuration is cached. Update compiler-error exit codes and exercise help during cross-compilation, argument forwarding, and formatter execution.
  • Give object artifacts an explicit installation directory (zig-out/lib), fixing a pre-existing panic exposed by the expanded fixture coverage.

Validation on Zig 0.17.0, x86_64 Linux:

  • zig fmt --check build.zig src examples test/fixtures
  • zig build test --summary all from a clean temporary copy: 37/37 build steps succeeded, 33/33 unit tests passed.
  • Immediate repeat with cached configuration: 37/37 build steps succeeded.

CI now uses Zig 0.17.0 and runs the suite twice to cover configuration reuse.

@wemeetagain wemeetagain changed the title Port zbuild to Zig 0.17 feat!: port zbuild to Zig 0.17 Oct 6, 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.

1 participant