You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id: F12.8/A7 third guest language — Zig SDK passing conformance with a playable example #12596
Phase 12 exit criterion 3 — "guest languages with a passing conformance suite: at least 3" — is not met. pkgs/id/examples on main has Roc guests and the Rust rust-world/rust-counter guests; there is no third guest SDK. The 2026-11-22 exit-audit re-run (see #12231) also found no open issue carrying this work: the 2026-11-21 results-first plan decided the third language (step A7: Zig, superseding the open owner decision noted 2026-11-09), but the work itself is tracked nowhere. (The 07:05 audit linked #1067 for this row; #1067 is F12.10 fair scheduling and does not cover it — corrected here.)
What to do
F12.8 second/third guest SDK work, Zig leg (plan step A7: a Zig toolchain is already in the tree for the Roc host): a Zig guest SDK with screen, json, grid, and cap helpers equal to the Roc libraries, passing the F12.7 conformance suite, with a playable example world.
Done when
The Zig SDK passes the conformance suite and ships a playable example, recorded where the Phase 12 exit audit (#12231) can cite it.
Filed by agent felix from the #12231 exit-audit re-run, 2026-11-22.
First slice landed as PR #12793 (branch xaltha/12596-zig-sdk): Zig SDK skeleton + json and grid helpers (Zig ports of RocJson/RocGrid, same limits and error codes), with zig-toolchain.sh pinned to Zig 0.16.0 and zig-sdk-test.sh.
Verified locally with pinned Zig 0.16.0 (shasum-checked download, no laptop needed): zig fmt --check clean, zig build test 31/31 passed, wasm32-freestanding build OK. This moves the "Zig guest SDK with screen, json, grid, and cap helpers" criterion to 2 of 4 helpers; it does not close the issue. Remaining: screen + cap helpers, a playable example world, and the F12.7 conformance run (plus wiring the test into the roc-test just recipe once the nix-provided Zig version is confirmed to be 0.16.0).
Pickup (xaltha): slice 2 of the Zig SDK — screen + cap helpers (Zig ports of Screen and RocCap), with tests mirroring the Roc expect cases. PR #12793 (slice 1) is still open, so this slice stacks on its head: branch xaltha/12596-zig-sdk-screen-cap off xaltha/12596-zig-sdk, PR will target that branch and say so. Remaining after this slice: the playable example world and the F12.7 conformance run.
Slice 2 landed as PR #12827 (branch xaltha/12596-zig-sdk-screen-cap, stacked on PR #12793 — it targets xaltha/12596-zig-sdk and retargets to main once slice 1 merges): the screen + cap helpers, completing the four-helper parity set (screen, json, grid, cap).
src/screen.zig: Zig port of Screen — drawing (putText/putRow/putGrid/fill/rule/boxed) and renders (renderPlain/renderJson/renderAnsi, renderRowsJson, boxEdge); the JSON screen document is byte-for-byte the Roc one.
src/cap.zig: Zig port of RocCap — Session bookkeeping (request ids, pending list, result routing) and the eight request-document builders on the slice-1 json values.
Verified locally with pinned Zig 0.16.0 via zig-sdk-test.sh: zig fmt --check clean, zig build test green (22 new tests: 15 screen mirroring the Screen.roc expects, 7 cap), wasm32-freestanding build OK. This moves the SDK criterion to 4 of 4 helpers; it does not close the issue. Remaining: a playable example world and the F12.7 conformance run (plus wiring the test into the roc-test just recipe once the nix-provided Zig version is confirmed to be 0.16.0).
Pickup (xaltha): slice 3 of the Zig SDK — the playable example world. PRs #12793 (slice 1) and #12827 (slice 2) are still open, so this slice stacks on the slice-2 head: branch xaltha/12596-zig-counter off xaltha/12596-zig-sdk-screen-cap, PR will target that branch and retarget as the stack merges.
Scope: examples/zig-counter/ — the third twin of roc-counter/rust-counter (same counter scenario, same Plaza ABI v1 surface, same boxed-screen view), built on the Zig SDK, with the built module checked in as counter.wasm like its twins so the F12.7 conformance slice can load it without a Zig toolchain. Remaining after this slice: the F12.7 conformance run (adding zig-counter to the sandbox suite), plus the roc-test wiring once the nix Zig version is confirmed 0.16.0.
Slice 3 landed as PR #12837 (branch xaltha/12596-zig-counter, stacked on PR #12827 — it targets xaltha/12596-zig-sdk-screen-cap and retargets to main as the stack merges): the playable example world, examples/zig-counter/.
The third twin of roc-counter/rust-counter: same counter scenario on the Plaza ABI v1 surface — init ignores the seed, update increments on a trimmed inc, view/layout render the boxed screen through the SDK's screen helper, records publishes {"count":N} encoded with the SDK's json helper, wants is {}, snapshot is the decimal count and restore is total. The plaza_* glue in src/main.zig mirrors the Rust SDK's plaza_guest! plumbing (leaked model pointer, one shared output slot, alloc/free over the guest allocator).
build.sh (guard + tests + build) refreshes the checked-in counter.wasm (65,445 bytes), so the conformance slice can load it as the zig-counter fixture with no Zig toolchain. zig-sdk-test.sh now also covers the example; root .gitignore gains the zig-counter build-output lines.
Verified locally with pinned Zig 0.16.0: zig-sdk-test.sh green end to end (SDK suites + counter host tests 3/3, incl. byte-equality of the boxed screen document; both wasm32-freestanding builds OK; fmt clean). The checked-in module was also driven at the raw ABI level (host-side alloc/write/free as the runner does): version 1, inc x2 (one padded) → view byte-identical to the twins' document at count=2, records/wants/snapshot/restore all as specified, restore total on junk, zero imports, exports exactly the 14 documented + memory.
This completes the "playable example world" piece; it does not close the issue. Remaining: the F12.7 conformance run (add zig-counter to CONFORMANCE_MODULES in crates/id-worlds/src/sandbox.rs and record the pass for the #12231 exit audit), plus wiring zig-sdk-test.sh into the roc-test just recipe once the nix-provided Zig version is confirmed to be 0.16.0.
Pickup (xaltha): final slice of the Zig SDK — the F12.7 conformance run. PRs #12793 (slice 1), #12827 (slice 2) and #12837 (slice 3) are all still open, so this slice stacks on the slice-3 head: branch xaltha/12596-zig-conformance off xaltha/12596-zig-counter, PR will target that branch and retarget as the stack merges.
Scope: add zig-counter to CONFORMANCE_MODULES in crates/id-worlds/src/sandbox.rs, run the F12.7 conformance suite on the laptop with the Zig module included, and record the pass here for the #12231 exit audit. Also checking the nix-pinned Zig version; zig-sdk-test.sh gets wired into the roc-test just recipe only if nix provides Zig 0.16.0.
Activity
developing-today commentedon Nov 22, 2026
CODE-4634
feat(id): Zig guest SDK skeleton with json + grid helpers (#12596)
chore: ignore Zig build outputs (.zig-cache, zig-out) (#12596)
dezren39 commentedon Nov 23, 2026
First slice landed as PR #12793 (branch
xaltha/12596-zig-sdk): Zig SDK skeleton +jsonandgridhelpers (Zig ports of RocJson/RocGrid, same limits and error codes), withzig-toolchain.shpinned to Zig 0.16.0 andzig-sdk-test.sh.Verified locally with pinned Zig 0.16.0 (shasum-checked download, no laptop needed):
zig fmt --checkclean,zig build test31/31 passed,wasm32-freestandingbuild OK. This moves the "Zig guest SDK with screen, json, grid, and cap helpers" criterion to 2 of 4 helpers; it does not close the issue. Remaining:screen+caphelpers, a playable example world, and the F12.7 conformance run (plus wiring the test into theroc-testjust recipe once the nix-provided Zig version is confirmed to be 0.16.0).dezren39 commentedon Nov 23, 2026
Pickup (xaltha): slice 2 of the Zig SDK —
screen+caphelpers (Zig ports ofScreenandRocCap), with tests mirroring the Rocexpectcases. PR #12793 (slice 1) is still open, so this slice stacks on its head: branchxaltha/12596-zig-sdk-screen-capoffxaltha/12596-zig-sdk, PR will target that branch and say so. Remaining after this slice: the playable example world and the F12.7 conformance run.feat(id): Zig guest SDK screen + cap helpers (#12596)
dezren39 commentedon Nov 23, 2026
Slice 2 landed as PR #12827 (branch
xaltha/12596-zig-sdk-screen-cap, stacked on PR #12793 — it targetsxaltha/12596-zig-sdkand retargets tomainonce slice 1 merges): thescreen+caphelpers, completing the four-helper parity set (screen,json,grid,cap).src/screen.zig: Zig port ofScreen— drawing (putText/putRow/putGrid/fill/rule/boxed) and renders (renderPlain/renderJson/renderAnsi,renderRowsJson,boxEdge); the JSON screen document is byte-for-byte the Roc one.src/cap.zig: Zig port ofRocCap—Sessionbookkeeping (request ids, pending list, result routing) and the eight request-document builders on the slice-1jsonvalues.Verified locally with pinned Zig 0.16.0 via
zig-sdk-test.sh:zig fmt --checkclean,zig build testgreen (22 new tests: 15 screen mirroring theScreen.rocexpects, 7 cap),wasm32-freestandingbuild OK. This moves the SDK criterion to 4 of 4 helpers; it does not close the issue. Remaining: a playable example world and the F12.7 conformance run (plus wiring the test into theroc-testjust recipe once the nix-provided Zig version is confirmed to be 0.16.0).dezren39 commentedon Nov 23, 2026
Pickup (xaltha): slice 3 of the Zig SDK — the playable example world. PRs #12793 (slice 1) and #12827 (slice 2) are still open, so this slice stacks on the slice-2 head: branch
xaltha/12596-zig-counteroffxaltha/12596-zig-sdk-screen-cap, PR will target that branch and retarget as the stack merges.Scope:
examples/zig-counter/— the third twin ofroc-counter/rust-counter(same counter scenario, same Plaza ABI v1 surface, same boxed-screen view), built on the Zig SDK, with the built module checked in ascounter.wasmlike its twins so the F12.7 conformance slice can load it without a Zig toolchain. Remaining after this slice: the F12.7 conformance run (adding zig-counter to the sandbox suite), plus the roc-test wiring once the nix Zig version is confirmed 0.16.0.feat(id): Zig counter example world on the Zig SDK (#12596)
dezren39 commentedon Nov 23, 2026
Slice 3 landed as PR #12837 (branch
xaltha/12596-zig-counter, stacked on PR #12827 — it targetsxaltha/12596-zig-sdk-screen-capand retargets tomainas the stack merges): the playable example world,examples/zig-counter/.roc-counter/rust-counter: same counter scenario on the Plaza ABI v1 surface —initignores the seed,updateincrements on a trimmedinc,view/layoutrender the boxed screen through the SDK'sscreenhelper,recordspublishes{"count":N}encoded with the SDK'sjsonhelper,wantsis{}, snapshot is the decimal count and restore is total. Theplaza_*glue insrc/main.zigmirrors the Rust SDK'splaza_guest!plumbing (leaked model pointer, one shared output slot, alloc/free over the guest allocator).build.sh(guard + tests + build) refreshes the checked-incounter.wasm(65,445 bytes), so the conformance slice can load it as thezig-counterfixture with no Zig toolchain.zig-sdk-test.shnow also covers the example; root.gitignoregains thezig-counterbuild-output lines.Verified locally with pinned Zig 0.16.0:
zig-sdk-test.shgreen end to end (SDK suites + counter host tests 3/3, incl. byte-equality of the boxed screen document; both wasm32-freestanding builds OK; fmt clean). The checked-in module was also driven at the raw ABI level (host-side alloc/write/free as the runner does): version 1,incx2 (one padded) → view byte-identical to the twins' document at count=2, records/wants/snapshot/restore all as specified, restore total on junk, zero imports, exports exactly the 14 documented +memory.This completes the "playable example world" piece; it does not close the issue. Remaining: the F12.7 conformance run (add
zig-countertoCONFORMANCE_MODULESincrates/id-worlds/src/sandbox.rsand record the pass for the #12231 exit audit), plus wiringzig-sdk-test.shinto theroc-testjust recipe once the nix-provided Zig version is confirmed to be 0.16.0.dezren39 commentedon Nov 23, 2026
Pickup (xaltha): final slice of the Zig SDK — the F12.7 conformance run. PRs #12793 (slice 1), #12827 (slice 2) and #12837 (slice 3) are all still open, so this slice stacks on the slice-3 head: branch
xaltha/12596-zig-conformanceoffxaltha/12596-zig-counter, PR will target that branch and retarget as the stack merges.Scope: add
zig-countertoCONFORMANCE_MODULESincrates/id-worlds/src/sandbox.rs, run the F12.7 conformance suite on the laptop with the Zig module included, and record the pass here for the #12231 exit audit. Also checking the nix-pinned Zig version;zig-sdk-test.shgets wired into theroc-testjust recipe only if nix provides Zig 0.16.0.test(id-worlds): add zig-counter to the F12.7 conformance modules (#1…