Skip to content

feat(wasix): support direct Node execution - #135

Merged
f0rr0 merged 1 commit into
f0rr0/wasix-sdk-clean-breakfrom
f0rr0/wasix-node-direct
Aug 13, 2026
Merged

feat(wasix): support direct Node execution#135
f0rr0 merged 1 commit into
f0rr0/wasix-sdk-clean-breakfrom
f0rr0/wasix-node-direct

Conversation

@f0rr0

@f0rr0 f0rr0 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • honor execution: "direct" on Node while preserving "worker" as the default
  • share one Node host/session bootstrap between direct and worker placement
  • exercise direct/worker correctness, recovery, disposal, and directory persistence from the packed package
  • qualify both Node placements independently against @electric-sql/pglite@0.5.4

Why

The original Node guard outlived the limitation that motivated it. The runtime can now execute in the caller realm, and an explicit direct placement should be an application choice: it trades worker isolation for lower per-call overhead and can block the caller's event loop. Directory storage keeps its main-thread requirement because its synchronous lease and recovery behavior is a storage constraint, not an execution-placement policy.

Performance evidence

Final commit: 504b40f192570fc13e8096facbb404be4a446f93

Matched Node placements, ten alternating fresh-process pairs per placement:

Placement Geomean Oliphaunt/PGlite Aggregate win Gate
Worker 0.6175 38.25% PASS
Direct 0.6219 37.81% PASS

Both gates require <= 0.80 after correctness and PostgreSQL-settings parity. Direct is materially faster on startup, warm round trips, and indexed updates. Bulk insert and index creation remain slower than PGlite and are retained in the gate rather than excluded.

The browser qualification already merged into this stack in #134 remains unchanged: direct 0.5035 and worker 0.2029, with workload, durability, and WAL parity passing.

Validation

  • moon run sdk-contracts:check oliphaunt-js:package oliphaunt-react-native:package oliphaunt-wasix-ts:package
  • moon run oliphaunt-wasix-ts:bench
  • packed Node smoke covering direct and worker placements plus cross-placement directory persistence
  • WASIX TypeScript typecheck and unit tests: 19 files / 129 tests
  • repository formatting policy and git diff --check
  • exact clean-commit Node benchmark: worker 0.6175, direct 0.6219

Stacked onto the current head of #129 (f0rr0/wasix-sdk-clean-break).

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
oliphaunt-docs Ready Ready Preview Aug 13, 2026 10:37am

@f0rr0
f0rr0 marked this pull request as ready for review August 13, 2026 11:14
@f0rr0
f0rr0 merged commit d403928 into f0rr0/wasix-sdk-clean-break Aug 13, 2026
25 of 34 checks passed
@f0rr0
f0rr0 deleted the f0rr0/wasix-node-direct branch August 13, 2026 11:15
f0rr0 added a commit that referenced this pull request Aug 13, 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