From 0cc636f237290b132c8e14d90bd1f1c3f0219ee7 Mon Sep 17 00:00:00 2001 From: TJKoury Date: Mon, 16 Nov 2026 12:21:02 -0500 Subject: [PATCH] Export the host ABI as its own entry: space-data-module-sdk/host/abi 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 --- CHANGELOG.md | 1 + package.json | 1 + test/browser-reachable-node-builtins.test.js | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27eae8f..5c79aa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - MODULE compilation accepts hash-verified prebuilt WebAssembly objects and static archives through `prebuiltLibraries`. Input order and producer symbols are preserved; input bytes participate in the link cache. - Guest-link output carries prebuilt libraries into FLOW compilation. Identical names and hashes link once; conflicting content for a name or namespace is refused. - The compile CLI accepts guest-link metadata with `--prebuilt-libraries`. Artifact guards retain their checks and include library names in failures. +- The host ABI has its own entry, `space-data-module-sdk/host/abi` (`createHostcallBridge` and the host dispatchers). A browser bundle that needs the hostcall bridge alone no longer has to import the package root, whose browser entry brings the runtime host and the FlatSQL runtime store with it. ## 0.10.2 diff --git a/package.json b/package.json index bb82b7d..e88c858 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "default": "./src/host/isomorphicLoader.js" }, "./host/browser-module": "./src/host/browserModuleHarness.js", + "./host/abi": "./src/host/abi.js", "./host/runtime-target-gate": "./src/host/runtimeTargetGate.js", "./host/node-builtin": "./src/host/nodeBuiltinSpecifier.js", "./host/worker-module": "./src/host/workerModuleHarness.js", diff --git a/test/browser-reachable-node-builtins.test.js b/test/browser-reachable-node-builtins.test.js index 312b6e3..0988693 100644 --- a/test/browser-reachable-node-builtins.test.js +++ b/test/browser-reachable-node-builtins.test.js @@ -45,6 +45,7 @@ export const BROWSER_FACING_SUBPATHS = [ "./host/wasi-shim", "./host/isomorphic", "./host/browser-module", + "./host/abi", "./host/runtime-target-gate", "./host/node-builtin", "./host/worker-module",