Skip to content

v0.1.0 — Zig 0.16 std.Io migration

Latest

Choose a tag to compare

@duanebester duanebester released this 23 Apr 21:12
· 115 commits to main since this release

First release targeting Zig 0.16.0. The std.Io migration touches every layer of the framework; this tag marks the stable point after Phases 1–5 landed and zig build test went green (9/9 steps, 980/980 tests passed on macOS arm64).

Highlights

  • Framework-wide std.Iocx.io() accessor on every render function; std.Io.Threaded constructed in generated main().
  • Platform dispatchers deleted — ~1000 lines of GCD / eventfd trampolines replaced by std.Io.Queue(T) + cx.drainQueue(). Zero heap allocation on the cross-thread result path.
  • Structured cancellationstd.Io.Group with app-level and entity-attached lifetimes. Auto-cancel on component unmount and window close.
  • Async image + network loadingui.ImagePrimitive accepts URL sources on native; bounded retry with exponential backoff and jitter in the fetch task; failed-URL cache prevents per-frame retry storms.
  • Platform shims retiredsrc/platform/time.zig deleted entirely; src/platform/mutex.zig reduced to a render-mutex-only shim (single user: CVDisplayLink). Non-render mutexes migrated to std.Io.Mutex. Timing uses std.Io.Timestamp.now(io, .awake).

Known limitations

  • WASM is deferred on Zig 0.16.0. std.Io.Threaded eagerly references posix.system.getrandom / posix.IOV_MAX, both of which resolve to void on wasm32-freestanding — an upstream gating bug, not a Gooey issue. wasm / wasm-* build steps are removed from build.zig for this tag; WASM source paths are preserved intact and will resume compiling when upstream lands the fix. Exit criteria are documented in the migration doc.
  • std.Io.Evented (macOS GCD backend) evaluation deferred — experimental upstream, reported perf regression, missing vtable entries. Phase 6 of the migration remains open.

Docs

  • docs/zig-0.16-io-migration.md — full migration roadmap and rationale (694 lines).
  • docs/benchmarks/ — post-migration benchmark baseline (172 entries across layout/context/core/text suites; macOS arm64 ReleaseFast). README explains the regression-detection workflow via zig build bench-compare.

Historical anchor

  • pre-io-migration tag points at the last pre-0.16 commit (ccb78f3, Zig 0.15-era). That tree does not compile on Zig 0.16.0 — kept for blame archaeology only.