ReviewOS

zig-utils/zig-js

ABI: implement the pinned Bun private-JSC profile

#164
Closed chris opened this 10 days ago ·
10 days ago

Parent: #140

The private compatibility target is Bun 4982b91e3702094330f3be3883354c52b8c01323. Its generated inventory pins every declaration, provider, layout, calling convention, and semantic contract; mismatched revisions and drift fail explicitly.

Acceptance

  • Pin the exact Bun revision and private binding source set.
  • Inventory every required private symbol, layout, calling convention, and semantic assumption.
  • Implement the complete declared profile behind the private shim boundary.
  • Reject unknown or mismatched profile revisions.
  • Add generated verification and independently compiled consumer fixtures.
  • Reach zero missing and zero unclassified entries.

Terminal evidence

  • Bun profile: 437/437 implemented, zero pending/unclassified.
  • Independently compiled exact-consumer fixtures pass in Debug, ReleaseSafe, and TSan.
  • #422 pins all 24 Bun-owned provider definitions and verifies consumer-side final linkage without duplicate zig-js exports.
  • Final implementation children #411, #412, #417, and #422 are closed.
  • Exact main commit e3fdc52385204c75fe6ae5c64d48dae6e5ede418: 43/43 Actions jobs passed.
10 days ago

#253 complete: Bun core 254/421 with 167 pending; shared compiled consumer 259/259; zero unclassified.

10 days ago

#255 adds both Bun-core contiguous-vector exports and focused runtime evidence. Progress is now 256/421 implemented, 165 pending, with the shared fixture at 261/261 and zero unclassified declarations. #254 is linked as open work.

10 days ago

#254 adds the Bun-core async stack export and runtime metadata. Bun core is now 257/421 implemented with 164 pending; the shared fixture is 262/262 and the Bun audit remains zero-unclassified.

10 days ago

Opened #256 for the next bounded private-ABI slice: validated MAP_PRIVATE shared-memfd import into exact ArrayBuffer/Uint8Array values with no-copy slice semantics and exactly-once full-region unmapping. Opaque native JSC::ArrayBuffer handles remain deliberately separate until their producer/lifetime contract is specified.

10 days ago

Completed #256 on main through ae61fd67 (runtime e0164ae9). Evidence: focused ownership/GC matrix green; compiled consumer 263/263; Home 264/431 with 167 pending; Bun 258/421 with 163 pending; both audits zero-unclassified; Bun-selected tags green. README/docs are current, while the 1,540-sample benchmark remains unchanged because this embedding-only path is outside the workload.

10 days ago

Opened #257 for the three opaque native ArrayBuffer exports plus their real bindgen producer. The pinned converter transfers RefPtr<JSC::ArrayBuffer>::leakRef() as an adopted +1, so completion requires an independent backing-store handle that can outlive its JS wrapper/VM—not a raw cell pointer or realm-retaining test adapter.

10 days ago

Opened #258 for the next executable private-ABI cluster: exact GetterSetter/CustomGetterSetter cells, their four null predicates, generated type checks, and non-indexed property traversal that returns descriptor cells without invoking ordinary getters.

10 days ago

Body sync: the Progress section had stalled at #259 (268/421). Updated to current — 277/421 implemented, 144 pending, shared fixture 287/287 — and added the three landed Bun-inventory children to the tracked list: #295 (SystemError bridges), #301 (owning-VM query), #302 (VM API-lock + execution-time-limit exports, six Bun-inventory symbols flipped with the same commits 7f6cbf17 / e1b0755f). Zero unclassified entries retained.

10 days ago

Claiming the next slice: JSC__JSObject__create (Bun-only pending, JSObject.zig:11 / bindings.cpp:2477) → child issue #306. Empty-object construction with realm Object.prototype + synchronous consumer initializer callback (Bun's struct-marshalling path). Home inventory count unaffected; shared fixture goes 290 → 291.

10 days ago

#306 closed — JSC__JSObject__create (Bun-only, JSObject.zig:11 / bindings.cpp:2477) is implemented and on main: fresh realm-prototype empty object + exactly one synchronous consumer initializer with pass-through ctx, canonical cell handle (identical to the returned value's exposed cell address), and same global handle; capacity documented as a performance-only hint; null-global returns empty without invoking the callback. Evidence: d7cb8529 + 61f953e5; fixture 291/291; Bun audit 281/140, Home audit unchanged at 288/143, c-api 117/117 (+297 private exports); full-suite worktree A/B on pinned 21d251ec → zero new failures. Tracker bodies synced.

10 days ago

Pending-symbol triage note (mirrors the #163 note; no code change):

  • Bun__runDeferredWork — rejected: the task is a consumer-C++-owned heap object zig-js can never construct or receive; FinalizationRegistry cleanup is already delivered engine-side via the context-owned cleanup queue.
  • web_worker.zig cluster (6) — deferred with the WebCore Worker/EventTarget feature area, not as one-off shims.
10 days ago

Bun private ABI progress: #323 landed in a40ec46, bringing the pinned core inventory to 310 implemented / 111 pending at that commit. The exact owned serialization layout, round trip, flags, exception paths, OOM, GC stability, and idempotent release are covered. Full CI: https://github.com/zig-utils/zig-js/actions/runs/29698929044.

10 days ago

Next Bun private-ABI child: #324 tracks the three external ZigString ownership/finalization exports deferred by #199, pinned to Bun 4982b91 with exact GC/teardown callback and compiled-consumer gates.

10 days ago

Bun private ABI progress: #322 landed in f095db7; pinned core inventory is now 311 implemented / 110 pending. Exact custom-inspect call shape, styling, exceptions, cross-VM rejection, and GC roots are covered. Full CI: https://github.com/zig-utils/zig-js/actions/runs/29700271582.

10 days ago

74b0fe3f implements the three external ZigString entries shared with Home. The regenerated pinned Bun core inventory is now 314 implemented private / 107 pending; bun-private-abi-audit passes. Acceptance matrix: https://github.com/zig-utils/zig-js/actions/runs/29702181895.

10 days ago

Private-profile progress update: #327 is implemented on main through eed1a550 with six TextCodec exports, pure-Zig deterministic fallback decoders, SHA-256-pinned generated tables, and independent consumer coverage. Home is now 329/431 private symbols implemented (102 pending); Bun core is 320/421 (101 pending); the Home fixture is 333/333. Descendant acceptance is running at https://github.com/zig-utils/zig-js/actions/runs/29703497726.

10 days ago

Bun core progress: accepted run 29703497726 and closed the completed inspect/TextCodec/ownership/GC issues. #329 covers the 14 shared AbortSignal declarations (target 334/421 implemented, 87 pending); Bun-only getTimeout remains honestly pending in #330 until its event-loop record is layout- and lifetime-correct.

10 days ago

#331 corrected the scanner boundary in e4ee7c7: explicit C-link declarations are now inventoried instead of silently excluded. The exact Bun core denominator is 461 private symbols: 335 implemented and 126 pending. The pinned Home/Bun comparison is now 481 shared, 3 Bun-only, 57 Home-only, and 37 changed-signature symbols.

10 days ago

Accepted follow-up update: #330 is complete on main, including the Bun-compatible AbortSignal timeout handle and consumer fixture. Bun inventory is now 336/461 implemented (125 pending). Full descendant matrix: https://github.com/zig-utils/zig-js/actions/runs/29706564614.

10 days ago

#367 is complete at 21561474: Bun__JSValue__protect/unprotect now provide counted precise-GC roots with exact primitive/unmatched no-op behavior. Current Bun status is 338/461 private implemented, 123 pending, zero unclassified; the compiled consumer passes 333/333 in Debug and ReleaseSafe.

10 days ago

Bun progress after #368 (4be4789d / 01cfa77b): 344/461 private symbols implemented, 117 pending, zero unclassified. A dedicated Bun property-iterator compile/link/runtime fixture now passes Debug/ReleaseSafe and is wired into the private-ABI CI boundary.

10 days ago

#369 landed in 07a3e398: Bun is now 348/461 private symbols implemented, 113 pending, zero unclassified. The dedicated Bun ArrayBuffer ownership fixture passes in Debug and ReleaseSafe.

10 days ago

#370 landed in 01b3aef3: Bun is now 351/461 private symbols implemented, 110 pending, zero unclassified. The Bun-profiled property fixture passes in Debug and ReleaseSafe.

10 days ago

#371 is complete at 930f177b: Bun is now 353/461 implemented with 108 pending; the dedicated Bun consumer passes in Debug and ReleaseSafe.

10 days ago

#372 is complete at 3e96dde2: Bun is 354/461 implemented with 107 pending; the Bun-profiled consumer passes Debug/ReleaseSafe.

10 days ago

Bun core private ABI update from #373 / df79596: async-context capture/brand/call exports are implemented with dynamic restoration and GC-safe strong edges. Inventory: 357/461 implemented, 104 pending. The Bun compiled extension consumer passed in Debug and ReleaseSafe.

10 days ago

Bun profile progress: #374 landed on main in 172fea6. DOMFormData adds ten implemented private entries, moving the pinned inventory to 367/461 implemented and 94 pending with zero unclassified. A focused fixture compiles Bun exact declarations for all ten symbols and passes its runtime matrix in Debug and ReleaseSafe; CI now runs it at the Bun private-ABI boundary.

10 days ago

Bun profile progress: #378 landed in 9c51dee. CommonStrings adds one implemented symbol, moving the pinned profile to 368/461 implemented and 93 pending with zero unclassified entries. The exact Bun declaration/runtime fixture passes in Debug and ReleaseSafe.

10 days ago

FetchHeaders checkpoint: #376 is complete in 975386e2 + b4a9f717. The Bun inventory is now 389/461 implemented, with all 21 core FetchHeaders declarations covered by the exact compile-link-runtime fixture. The remaining four external adapter symbols stay tracked by #377.

10 days ago

PicoHeaders checkpoint: #380 is complete in 91c91b3f + 42bcd356. Bun is now 390/461 implemented (71 pending), and the focused FetchHeaders fixture covers 22/22 exports in Debug and ReleaseSafe. The three remaining opaque UWS/H3 exports are #381.

10 days ago

UWS/H3 request checkpoint: #382 is complete in a9e909b4 + 727a1651. Bun is now 392/461 implemented (69 pending), with 24/24 focused FetchHeaders symbols in Debug and ReleaseSafe. Only response writer #383 remains.

10 days ago

FetchHeaders #375 is complete. Bun is now 393/461 implemented (68 pending), with the focused FetchHeaders fixture at 25/25 in Debug and ReleaseSafe.

10 days ago

#390 advances the pinned Bun profile to 396/461 implemented with 65 pending and zero unclassified; its dedicated exact consumer passes in Debug and ReleaseSafe.

10 days ago

#391 closes the standalone VM lifecycle/GC-deferral slice. Bun is now 400/461 implemented with 61 pending and zero unclassified; the exact VM consumer passes in Debug and ReleaseSafe.

10 days ago

The pending BunDebugger__willHotReload entry is now tracked by shared implementation child #392.

10 days ago

The pending Bun__ErrorCode__determineSpecificType entry is now tracked by shared child #393.

10 days ago

Linked #394 under #393 for the exact inspector fallback used by the Bun private profile.

10 days ago

#393 core advances the pinned Bun private profile to 402/461 implemented (59 pending) in 18527d73; Debug/ReleaseSafe consumer evidence passes. #394 remains linked for the falsy-constructor inspector fallback.

10 days ago

Profile update: #393 and #394 are complete through 522e19c. The Bun private ABI remains 402/461 implemented with 59 explicitly pending; received-value diagnostics now have compiled consumer, source-contract, Debug, and ReleaseSafe evidence.

10 days ago

#396 implements eight shared Bun core imports and refreshes the exact inventory from 402 to 410 implemented private symbols, leaving 51/461 pending. Pinned Bun revision/source/protocol hashes validate, and the Bun profile library compiles/links/runs the external consumer in Debug and ReleaseSafe. CI evidence is pending in run 29766523096.

10 days ago

#398 moves five shared HTTPServer inspector imports to implemented. Bun is now 415/461 implemented, 46 pending; the pinned 4982b91 audit and external consumer pass Debug and ReleaseSafe. Fixing main CI: https://github.com/zig-utils/zig-js/actions/runs/29769670857

10 days ago

#400 moves Bun__onSignalForJS to implemented. Bun is now 416/461 implemented, 45 pending; exact 4982b91 source audit plus Debug/ReleaseSafe external consumer evidence pass.

10 days ago

#396, #398, and #400 are closed on green bounded CI. The Bun profile is 416/461 (45 pending); #401 is correctly Home-only and does not inflate Bun coverage.

10 days ago

Published Bun profile checkpoint 737bd957: 418/461 private symbols implemented, 43 pending. #401 is Home-only; #402 contributes the two shared exact module-registry shims.

10 days ago

New tracked child #404 owns the remaining CPU sampling-profiler ABI cluster: per-VM lifecycle, safe cooperative stack sampling, Chrome/Markdown serialization, Home/Bun output ownership, OOM, and sanitizer evidence. This keeps the three profiler symbols out of the broad pending bucket without treating link-only stubs as progress.

10 days ago

The three CPU profiler exports are implemented by #404 on main through 9ab79698. Bun inventory is now 424/461 (37 pending); Debug, ReleaseSafe, and TSan cross-profile fixtures are green locally.

10 days ago

Next Bun pending cluster is tracked in #405: six readable-stream conversion exports and their required stream state machine.

10 days ago

#404 is complete. Per-VM CPU sampling profiles landed through 9ab796987fe04331761e620b2e928b9534330a4f; the exact fixing-main private-abi-boundary job passed its Debug, ReleaseSafe, and TSan evidence. The pinned counts remain Home 433/471 and Bun 424/461 at that checkpoint; #405 is the next active private-ABI slice.

10 days ago

#405 is implemented on main through 4275f7c2: all six pinned ReadableStream consumers now share realm-local stream/reader/controller machinery, exact Home/Bun contracts, and compiled Debug/ReleaseSafe/TSan fixtures. Inventories are now Home 439/471 (32 pending) and Bun 430/461 (31 pending). #405 remains open only for its exact fixing-main CI gate.

10 days ago

Created #406 for the next coherent boundary: real WebAssembly.compileStreaming/instantiateStreaming plus the pinned JSC__Wasm__StreamingCompiler__addBytes opaque feed. It explicitly preserves the frozen WG1 baseline while validating modern coverage through the existing WG3 and upstream-main profiles.

10 days ago

The declared exact profile is complete with zero pending/unclassified entries, and exact main e3fdc52385204c75fe6ae5c64d48dae6e5ede418 passed all 43 jobs in run 29806223245.

Sign in to comment on this issue.