Goal
Implement the pinned Home/Bun private-JSC JSFunction__createFromZig boundary with the exact BunString, JSHostFn, CallFrame, visibility, intrinsic, arity, and optional constructor contracts.
Parent tracking: #134, #140, #163, #164.
Required behavior
- Decode the by-value 24-byte
BunStringname without retaining borrowed input. - Create a callable function in the requested realm with stable
nameandlength. - Invoke the supplied
JSHostFnthrough the pinned JSC64CallFrameregister layout (callee, argument count includingthis, receiver/new.target, arguments). - Translate returned
EncodedJSValuevalues and pending exceptions exactly at the VM boundary. - Support an explicit constructor callback and the upstream default host-constructor path.
- Validate null/foreign/invalid values, pending-exception preservation, sibling realms, and GC rooting.
- Promote both pinned inventories and consumer evidence, then update README/docs.
Evidence gate
- Home private ABI audit: 249/431 implemented, 182 pending, zero unclassified.
- Bun private ABI audit: 243/421 implemented, 178 pending, zero unclassified.
- Compiled Home consumer fixture: 248/248, including call, construct, sibling-realm, GC, and failure paths.
- Targeted
test-home-private-abiandtest-c-apigates pass. - Benchmark artifact remains
36a617b3; this ABI-only slice does not alter the benchmark workload.