ReviewOS

zig-utils/zig-js

Implement VM-stable private CommonStrings projection

#378
Closed chris opened this 9 days ago ·
9 days ago

Parent: #134

Child of #140, #163, and #164. Implement Bun__CommonStringsForZig__toJS for the exact pinned 13-value u8 enum.

Acceptance:

  • Map all 13 enum values to the exact Bun strings: IPv4, IPv6, 127.0.0.1, ::, ipv4, ipv6, default, error, include, buffer, arraybuffer, nodebuffer, and uint8array.
  • Return one stable encoded JSString cell per value per VM across sibling realms; never share cells across VMs.
  • Reject invalid enum bytes and null/foreign globals deterministically.
  • Preserve pending exceptions and VM ownership.
  • Add exact declaration compile-link-runtime coverage in Debug and ReleaseSafe.
  • Refresh Home/Bun inventories, concise docs, CI if needed, and parent progress. Root benchmark scores remain unchanged without a new accepted run.
9 days ago

Implemented and pushed to main in 9c51dee. All 13 enum values map to exact strings with one stable encoded cell per value per VM, shared across sibling realms and isolated across VMs. Invalid enum bytes and null globals return empty; pending exceptions are preserved. Home links 363/363 and the exact Bun C-API fixture passes in Debug and ReleaseSafe. Inventories are now Home 376/471 implemented (95 pending) and Bun 368/461 (93 pending), both with zero unclassified entries. Concise ABI/API docs were refreshed; benchmark claims were unchanged because no accepted benchmark rerun occurred.

Sign in to comment on this issue.