ReviewOS

zig-utils/zig-js

ABI: implement exact private 64-bit BigInt bridge shims

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

Parents: #163, #164 Depends on: #166

Implement the shared no-truncation 64-bit BigInt boundary used by both pinned core profiles.

Acceptance:

  • Export the exact JSC__JSValue__fromInt64NoTruncate, JSC__JSValue__fromUInt64NoTruncate, and JSC__JSValue__toUInt64NoTruncate signatures.
  • Create real context-owned BigInt cells for every signed/unsigned 64-bit input.
  • Match JSC modulo-2^64 BigInt extraction and its int32/double fallback behavior.
  • Cover 0, signed boundaries, unsigned boundaries, negative BigInts, exact/non-exact doubles, and invalid values in compile-link-runtime fixtures.
  • Update both Home and Bun inventories/status totals without changing public/extension counts.
9 days ago

Implemented and verified on main in 46ccb1f, with documentation published in 3c53b3e.

Evidence:

  • exact three private exports link and run through the pinned Home consumer fixture;
  • constructors return real context-owned BigInt cells across signed/unsigned 64-bit boundaries;
  • extraction covers modulo-2^64 negative BigInts plus pinned int32 and exact non-negative Int52 fallbacks;
  • focused gates pass: zig build test-home-private-abi, zig build test-private-abi-value, zig build c-api-audit, and the pinned Bun private audit;
  • Home is now 7 implemented / 425 pending, Bun core is 7 / 415, while public C remains 117 and extensions remain 19.

Sign in to comment on this issue.