Skip to content

Export the host ABI as its own entry: space-data-module-sdk/host/abi - #22

Merged
TJKoury merged 1 commit into
mainfrom
export-host-abi
Nov 16, 2026
Merged

TJKoury merged 1 commit into
mainfrom
export-host-abi

Conversation

@TJKoury

@TJKoury TJKoury commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

createHostcallBridge and the host dispatchers were reachable only through the package root. A browser consumer that needs the bridge alone had to import the root, whose browser entry re-exports the runtime host and, with it, the FlatSQL runtime store. A bundler that emits an IIFE then fails on the top-level await in FlatSQL's Node host.

This adds one entry to the export map, ./host/abi (src/host/abi.js), a changelog line under 0.10.3, and the entry in the browser-facing list of test/browser-reachable-node-builtins.test.js.

Checked

  • Bundling src/host/abi.js for a browser as an IIFE succeeds: 53 inputs, none from the runtime host or FlatSQL.
  • The package imports itself through the new entry and gets createHostcallBridge.
  • test/browser-reachable-node-builtins.test.js: the new entry reaches no Node builtin.

Already failing on main, not changed here

  • The same test fails on main for the root (.) and for ./runtime-host: both reach node:fs, node:crypto, node:os and node:path through src/runtime-host/flatsqlRuntimeStore.js and the FlatSQL package entry. The failing set is identical with and without this change.
  • The JSON-boundary scan counts new JSON calls in src/compiler/compileModule.js and src/compiler/guestLinkLibraries.js, files this change does not touch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PT7jJcdnhrPX14f8BuYuZy

createHostcallBridge and the host dispatchers were reachable only through
the package root. A browser consumer that needs the bridge alone had to
import the root, whose browser entry re-exports the runtime host and with it
the FlatSQL runtime store. The new entry names src/host/abi.js directly: it
bundles for a browser without the runtime host, FlatSQL or a Node builtin.

The entry joins the browser-facing list of
test/browser-reachable-node-builtins.test.js and passes there. That test
fails on main before this change for the root and for ./runtime-host, which
reach Node builtins through the FlatSQL package entry; this change neither
causes nor fixes that.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@TJKoury
TJKoury merged commit 9b74c03 into main Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant