Skip to content

ABI: return owned BunString values for private BigInt conversion #195

Description

@chrisbbreuer

Parent

Scope

Implement the pinned shared JSC__JSBigInt__toString private ABI exactly enough for Bun/Home consumers:

  • mirror the 64-bit 24-byte BunString tagged-union layout and exact tag values;
  • return an owned, Latin-1 WTFStringImpl-tagged decimal result;
  • provide compatible atomic ref/deref ownership for the returned string storage;
  • preserve pending-exception and out-of-memory boundary behavior;
  • cover signed, oversized, ownership, layout, and cross-realm cases in the focused ABI fixture;
  • update both pinned inventories, ABI docs, roadmap progress, and README.

The pinned Bun implementation is src/jsc/bindings/JSBigIntBinding.cpp at 4982b91e; Home declares the same by-value ABI at 7ed99c02.

Acceptance

  • Exact layout/tag/refcount contract is documented and compile-time asserted.
  • JSC__JSBigInt__toString returns owned decimal text for every supported BigInt magnitude.
  • Caller ref/deref behavior is safe and leak-free.
  • Focused Home private ABI fixture and both pinned audits pass.
  • README and parent issues carry current counts/evidence.

Evidence

Implemented in a216853e; documentation published in c944a3f5.

  • zig build test-home-private-abi -Doptimize=Debug: 80/80 combined symbols linked and runtime matrix passed.
  • zig build home-private-abi-audit bun-private-abi-audit: Home 82/431 implemented (349 pending); Bun 75/421 implemented (346 pending).
  • Runtime coverage includes exact 24-byte/8-byte layout, tag values, StringImpl prefix/8-bit flag, signed and arbitrary-size decimal output, fresh refcount-one allocations, atomic retain/release, cold Rust destroy compatibility, same-VM sibling realms, and first-pending-exception preservation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions