ReviewOS

zig-utils/zig-js

ABI: implement retired module-registry snapshot shims exactly

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

Parent: #140 Profiles: #163, #164 Roadmap: #134

Pinned Bun 4982b91e retains two module-registry snapshot symbols as dead ABI compatibility shims after JSC stopped exposing the loader registry as a JavaScript Map. Implement their documented current behavior exactly instead of inventing a snapshot format.

Scope

  • Pin ZigGlobalObject.cpp source identity and its explicit no-caller contract.
  • Export Zig__GlobalObject__getModuleRegistryMap as nullptr.
  • Export Zig__GlobalObject__resetModuleRegistryMap as false.
  • Prove globals, opaque pointers, module state, and pending exceptions are not inspected or mutated.
  • Compile, link, and run Home and Bun profile consumers in Debug and ReleaseSafe.
  • Refresh inventories, concise README counts, and parent evidence.
  • Close only on green fixing CI.

This is deliberately exact: pinned upstream says the loader registry is no longer a JS Map, snapshot/restore is unsupported, both symbols have no callers, and they remain only for ABI compatibility.

9 days ago

Implemented and pushed to main in 540888cf + 737bd957. Both pinned symbols match upstream’s explicit dead-shim behavior (nullptr / false) without argument or VM inspection. Focused unit and dual-profile external consumers pass in Debug and ReleaseSafe; both audits, compatibility, and the 32-page docs build pass. Published counts are Home 427/471 (44 pending) and Bun 418/461 (43 pending). Awaiting green fixing CI before closure.

9 days ago

Closure gate is green: the exact private-abi-boundary job for main commit 7983fcab completed successfully: https://github.com/zig-utils/zig-js/actions/runs/29776746300/job/88467854285

Sign in to comment on this issue.