zig-0.17 #1

Merged
peterino merged 2 commits from zig-0.17 into main 2026-11-13 04:50:35 +00:00
Owner
No description provided.
peterino added 2 commits 2026-11-13 04:50:31 +00:00
264ffc99c4 Port to Zig 0.17 and fix codegen correctness
Zig 0.17 port
- build.zig: custom steps are gone in 0.17; archive/mkdir/write/rmtree
  now run through a small helper executable (src/build_helper.zig)
- sources use std.Io for files, processes and time, std.process.Init
  for main, and the unmanaged ArrayList / Io.Writer APIs
- generated code uses callconv(.c), @backingInt and @fromBackingInt

Codegen fixes
- enums: token based enum body parser. Members without a trailing
  comment (`NAME = value,`), with plain or multi-line comments, or
  without a trailing comma were dropped or broke the output. Values are
  numbered like C, duplicates become aliases, byte order conditionals
  use the little endian branch
- flags: packed struct fields are emitted by bit position with padding
  for gaps instead of in declaration order
- structs/unions: a field followed by a multi-line comment was dropped
- casts are derived from how a type is declared instead of from its
  name: pointers to SDL types use @ptrCast(@alignCast()), enums go
  through @intCast, by-value structs are reinterpreted through a pointer
- `void *` struct fields are `?*anyopaque` (was the invalid
  `[*c]anyopaque`); `struct X *` typedefs are `?*anyopaque`
- `const char *const *` spelling is handled
- SDL_guid.h and SDL_pen.h are generated since other modules import them

Build and tooling
- --skip-missing: headers a release does not ship (SDL_tray.h in 3.1.6)
  are skipped instead of failing the build
- --basedir only relocates tmp/debug/archive; input and output paths
  stay relative to the invocation directory
- `zig build fetch-sdl` no longer archives api/ and json/
- all module tests run under `zig build test`; stale mock tests updated
- release lists updated through SDL 3.4.20
d82587e040 Regenerate api and json from SDL 3.4.20
Generated from castholm v0.6.1+3.4.20 with the Zig 0.17 generator.
peterino merged commit 7f96dee040 into main 2026-11-13 04:50:35 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: peterino/sdlparser-scrap#1
No description provided.