GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(id): Zig counter example world on the Zig SDK (#12596) by dezren39 · Pull Request #12837 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Slice 3 of #12596: the playable example world for the Zig guest SDK — examples/zig-counter/, the third twin of roc-counter/rust-counter (same counter scenario, same Plaza ABI v1 surface from roc-world/ABI.md).

Stacked on PR #12827 (base xaltha/12596-zig-sdk-screen-cap), which is stacked on PR #12793; this PR retargets to main as the stack merges.

What it adds

  • src/main.zig — the pure program (init/update/view/layout/records/wants/snapshot/restore) plus the plaza_* glue mirroring the Rust SDK's plaza_guest! plumbing: leaked model pointer, one shared output slot released by the next output call, plaza_alloc/plaza_free over the guest allocator, diagnostic pair reading empty at rest. Uses the SDK's screen helper for the boxed 20x3 view (30 wide at viewport width >= 30) and its json helper to encode the {"count":N} records document.
  • build.zig/build.zig.zon — path-depends on ../zig-sdk; builds an import-free wasm32-freestanding module exporting exactly the 14 documented exports + memory (verified against the built module; rdynamic roots the exports since there is no entry point).
  • build.sh — toolchain guard + host tests + guest build, refreshing the checked-in counter.wasm (65,445 bytes) so the F12.7 conformance suite can load it as the zig-counter fixture with no Zig toolchain, like its twins.
  • zig-sdk/zig-sdk-test.sh now also covers the example (fmt check, host tests, guest build); zig-sdk/README.md updated; root .gitignore gains the zig-counter build-output lines mirroring the zig-sdk ones.

Verification (pinned Zig 0.16.0, local)

  • zig-sdk-test.sh green end to end: SDK suites, counter host tests 3/3 (mirrors of the rust-counter suite, including byte-equality of the boxed screen document), SDK + counter wasm32-freestanding builds OK, zig fmt --check clean.
  • The checked-in counter.wasm driven at the raw ABI level (WebAssembly instantiation, host-side alloc/write/free exactly as the runner does): plaza_abi_version = 1; inc x2 (one event whitespace-padded) then view = the twins' boxed screen document with count=2, byte-identical; records {"count":2}; wants {}; snapshot 2 -> restore round-trips; restore total on junk input; zero imports.

Remaining on #12596

The F12.7 conformance run — add zig-counter to CONFORMANCE_MODULES in crates/id-worlds/src/sandbox.rs and record the pass for the Phase 12 exit audit (#12231) — plus wiring zig-sdk-test.sh into the roc-test just recipe once the nix Zig version is confirmed 0.16.0.

Refs #12596


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
feat(id): Zig counter example world on the Zig SDK (#12596)
96b246b
Slice 3 of #12596: examples/zig-counter/, the third twin of
roc-counter/rust-counter — the same counter scenario on the Plaza
ABI v1 surface, built on the Zig guest SDK (screen for the boxed
view/layout, json for the records document).

- src/main.zig: the pure program (init/update/view/layout/records/
  wants/snapshot/restore) plus the plaza_* glue mirroring the Rust
  SDK's plaza_guest! plumbing (leaked model pointer, one shared
  output slot, alloc/free over the guest allocator); host tests
  mirror the rust-counter suite.
- build.zig builds an import-free wasm32-freestanding module with
  exactly the 14 documented exports + memory; build.sh runs the
  tests and refreshes the checked-in counter.wasm so the F12.7
  conformance suite can load it without a Zig toolchain.
- zig-sdk-test.sh now also covers the example (fmt, host tests,
  guest build); root .gitignore gains the zig-counter build-output
  lines, mirroring the zig-sdk ones.

Verified with pinned Zig 0.16.0: zig-sdk-test.sh green (SDK suites
53 tests + counter 3/3 host tests, both wasm builds OK); the
checked-in counter.wasm driven at the raw ABI level (init, inc x2
with a trimmed event, view byte-identical to the twins' boxed
screen document, records {"count":2}, wants {}, snapshot/restore
round-trip, restore total on junk) — all checks pass, zero imports.

Refs #12596. Stacked on xaltha/12596-zig-sdk-screen-cap (PR #12827);
retargets to main as the stack merges.
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 03:34
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6794e6b2-647f-4734-91fd-83a9a8788021
Commits

Reviewing files that changed from the base of the PR and between ac21bf0 and 96b246b.

Files ignored due to path filters: 1

  • pkgs/id/examples/zig-counter/counter.wasm is excluded by !**/*.wasm
Files selected for processing: 8

  • .gitignore
  • pkgs/id/examples/zig-counter/README.md
  • pkgs/id/examples/zig-counter/build.sh
  • pkgs/id/examples/zig-counter/build.zig
  • pkgs/id/examples/zig-counter/build.zig.zon
  • pkgs/id/examples/zig-counter/src/main.zig
  • pkgs/id/examples/zig-sdk/README.md
  • pkgs/id/examples/zig-sdk/zig-sdk-test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 23, 2026
id: F12.8/A7 third guest language — Zig SDK passing conformance with a playable example #12596
Closed
dezren39 added a commit that referenced this pull request Nov 23, 2026
@dezren39
test(id-worlds): add zig-counter to the F12.7 conformance modules (#1…
cdebea0
…2596)

The Zig guest SDK's playable example (examples/zig-counter, PR #12837)
joins roc-counter, rust-counter and tic-tac-toe in CONFORMANCE_MODULES,
so the ABI.md export-surface, abi-version and snapshot/restore
round-trip conformance tests now run against the checked-in Zig module
with no Zig toolchain required.
@dezren39
dezren39 removed the request for review from a team November 23, 2026 05:56
@dezren39

dezren39 commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
lane: lane-aaj (stale-PR warden shepherd, deferred merge-ready list)
outcome: not merged — stacked two levels deep

This PR's base is xaltha/12596-zig-sdk-screen-cap (PR #12827), which is itself stacked on PR #12793; both are still open and unmerged as of 2026-11-23T17:2xZ. The PR body states it retargets to main as the stack merges. The warden's merge-ready tag reflects mergeability against its stacked base only.

Shepherd action: none taken, to avoid landing a stack out of order under its author's active management. Unblock path: land #12793, then #12827, retargeting each time, re-run the zig SDK + counter example verification (zig-sdk-test.sh / build.sh), then merge. No review findings are outstanding on this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Base automatically changed from xaltha/12596-zig-sdk-screen-cap to main November 24, 2026 00:27
@dezren39
dezren39 merged commit 44bf3d6 into main Nov 24, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the xaltha/12596-zig-counter branch November 24, 2026 00:33
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
test(id-worlds): add zig-counter to the F12.7 conformance modules (#12596) #14470
Merged
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 26, 2026
id: Phase 12 exit audit and the id/v0.12.0 tag #12231
Open
@developing-today-fleet developing-today-fleet Bot added the audit:completed-later Gap completed by later merged PR label Nov 27, 2026
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 27, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:completed-later Gap completed by later merged PR

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.