Skip to content

refactor(v8-bridge): modularize the bridge into a per-subsystem TypeScript package#165

Merged
NathanFlurry merged 2 commits into
mainfrom
bridge-megasplit
Jul 1, 2026
Merged

refactor(v8-bridge): modularize the bridge into a per-subsystem TypeScript package#165
NathanFlurry merged 2 commits into
mainfrom
bridge-megasplit

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Follow-up to #164. Finishes turning the V8 bridge into a clean multi-file TypeScript package and removes the generated intermediate.

  • Remove the committed crates/execution/assets/v8-bridge.source.js seam: build-v8-bridge.mjs now generates the readable bundle in memory from bridge-src/index.ts and minifies it directly, so there is no generated .source.js to keep in sync.
  • Repoint the tools that read the old seam text at the TypeScript sources directly (polyfill-registry check, browser util-polyfill codegen, limits inventory audit, bridge rerun inputs).
  • Split the two mega-modules into per-subsystem files: network.ts into net/http/http2/dns/tls/dgram/fetch/sqlite, and process.ts into process/console/stdin/timers/crypto/vm/v8/perf/misc-stubs.
  • Split polyfills.ts into text-encoding/dom-events/abort/web-streams-fallback, extract the misfiled Undici client out of child-process.ts into its own module, and split the builtin-module registry out of module-loader.ts.
  • Preserve the sidecar/js/executor interface: no changes to the bridge contract, installed globals, module surface, or dispatch behavior.
  • Fix module-cycle initialization order issues introduced by the split (tty stubs and the sqlite/net/tls/dgram module-global installs), and add guest-runtime regression tests for require('tty') and require('sqlite').
  • Remove vestigial provenance comments and a dead import left over from the original bundle.
  • Unblock the workspace build by fixing pre-existing breakage unrelated to the bridge: the browser wire dispatcher now handles the LinkPackage route, its ConfigureVmRequest test constructors set the newer fields, and the build-tools type check drops a dangling script reference.

@railway-app railway-app Bot temporarily deployed to secure-exec / secure-exec-pr-165 July 1, 2026 19:36 Destroyed
@NathanFlurry NathanFlurry merged commit a6b0a0f into main Jul 1, 2026
2 of 3 checks passed
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