GeezerVison is showing github.com — id: F12.8/A7 third guest language — Zig SDK passing conformance with a playable example · Issue #12596 · developing-today/code
id: F12.8/A7 third guest language — Zig SDK passing conformance with a playable example #12596DescriptionProblem
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. Activitydeveloping-today commented on Nov 22, 2026 dezren39 commented on Nov 23, 2026 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). dezren39 commented on Nov 23, 2026 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. dezren39 commented on Nov 23, 2026 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). dezren39 commented on 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-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. dezren39 commented on Nov 23, 2026 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. dezren39 commented on 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-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. dezren39 commented on Nov 24, 2026 Conformance landing (oc-code-06, queue task 22786, 2026-11-24): PR #14470 opens the zig-counter CONFORMANCE_MODULES change, re-based onto current main as a single cherry-pick of cdebea0. The F12.7 run has not passed yet: cargo test -p id-worlds fails to compile id-store (iroh_blobs 0.103.1 vs 0.105.0 mismatch) before any test runs. Main's Cargo.lock pins only 0.103.1, so the duplicate comes from the worktree's dependency resolution. Follow-on routed to a separate issue; the pass will be recorded here once it runs green. dezren39 commented on Nov 24, 2026 F12.7 conformance pass recorded (lane oc-code-02, queue task 22786):
Branch xaltha/12596-zig-conformance-main updated to current main (merge e454511) on PR #14470. Ran the conformance subset in a clean worktree:
cargo test -p id-worlds --all-features sandbox::tests::conformance
result: 5 passed, 0 failed —
- conformance_documented_exports_match_abi_md_signatures
- conformance_abi_version_export_returns_one
- conformance_buffer_ownership_and_shared_output_slot
- conformance_snapshot_restore_round_trip_is_byte_identical
- conformance_capability_protocol_replays_through_the_fixture_base
Each test iterates all 4 CONFORMANCE_MODULES (roc-counter, rust-counter, tic-tac-toe, zig-counter), so the Zig module is exercised with no Zig toolchain required. The prior id-store compile blocker is resolved upstream: remote cargo check -p id-store on current main is green (Fleet Actions dezren39/fleet run 45440505886), and #14473 is closed as resolved. Merging #14470 next, then closing this issue. dezren39 commented on Nov 24, 2026 PR #14470 merged to main (b37b0e7, 2026-11-24T17:42Z): CONFORMANCE_MODULES is now 4/4 with zig-counter. F12.7 suite passed 5/5 on the merged head's tree (branch was current with main at merge time; only main-side commits moved after). All #12596 slices are now landed: SDK skeleton #12793, screen+cap helpers #12827, zig-counter example #12837, conformance landing #14470. Residual compile blocker #14473 closed as implemented. Closing.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|