Skip to content

v5.0.0 — Zig 0.17.1

Choose a tag to compare

@apotema apotema released this 30 Nov 19:16
bd2382e

labelle-engine now builds with Zig 0.17.1. Part of labelle-toolkit/labelle-assembler#836.

Breaking: Zig 0.16 is no longer supported, and labelle-core 3.0.0 or newer is required. The 4.x line stays on the zig-0.16 branch (at v4.1.4).

Action required for game code. In Zig 0.17, @hasDecl only sees pub declarations. The engine finds optional hooks with it, so anything declared without pub is now silently skipped where it used to fail to compile with "not marked pub":

  • script tick, setup, drawGui, State (and State.init / State.deinit), game_states;
  • component hooks: onAdd, onSet, onRemove, onReady, postLoad, visibility, consumable, anim_def_name;
  • plugin Systems, Components, GizmoCategories and their members;
  • hook handler functions on receivers.

The engine cannot detect a missing pub. Check these declarations when moving a game to this release.

Other changes:

  • Breaking: scene.GizmoRegistry(...).fields is renamed to field_names.
  • Fixed: std.EnumSet fields are recognised by the scene loaders again. The loaders identified a set by initEmpty, which Zig 0.17 renamed to empty, so sets had silently fallen into the plain-struct path.
  • Fixed: the Linux and Android save path uses the newfstatat syscall tag. That code only compiles for Linux targets.
  • Test-only pins: labelle-gfx v3.0.0, zspec v0.10.0.

1536 of 1536 tests pass, as on Zig 0.16, and CI passes on Linux and Windows.

Not in this release: the work on the release/4.2.0-rc.5 branch (position revisions, watched graph input mutations, the joined snapshot executor). It is still Zig 0.16 code and will be ported in a later 5.x release. No game has been assembled and built end to end against 5.0.0 yet, because the assembler and CLI have no Zig 0.17 release.