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