wasmplus #43

Merged
navicore merged 3 commits from wasmplus into main 2026-07-04 14:10:51 +00:00
Owner
No description provided.
Summary of the wasm track
All checks were successful
WASM Gates / WASM gates (Tier 1 wasi + Tier 2 reactor) (pull_request) Successful in 10s
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 1m1s
2570a6792e
Problem: removing JSON from the engine left the Tier-2 reactor emitting bson that its host glue couldn't decode,
 and just wasm-ci was broken with no plan.

 Resolution (the design we specced in docs/design/WASM_HOST_GLUE.md):

 1. ABI enabler — plg_rt_atom_name(id) → u64 in reactor.rs, reading the runtime interner (program + query atoms).
    Implementation corrected the step-1 plan: the originally-proposed static @plg_atom_strs export couldn't
    resolve query-introduced atoms (ids ≥ table size), which surfaced as a vanished functor key on X=f(X). The
    runtime resolver fixes that.
 2. Host bson→JSON glue — reactor.mjs rewritten with a bson parser, TermBuf/cell-ABI walker, and native JSON
    renderer; per-instance atom cache (WeakMap) to avoid cross-module conflation.
 3. Smoke — reactor-smoke.mjs now fixture-asserts the bson→JSON decode (no native differential — native has no
    JSON), plus single-query mode for the deep-recursion check.
 4. Recipe — wasm-reactor-smoke un-gated and restored; wasm-ci echo flipped back to honest "passed."

 The principle held: plgc speaks text + bson only. JSON lives entirely in host code (reactor.mjs), with
 plg_rt_atom_name as the one data export the host needs.

 Verified: atoms (program + query), ints/floats/big, compounds, proper/improper lists, cyclic terms (cut to "_"),
 errors, exhausted:false under limit — all through real worker modules under Node's V8; plus the 1M-deep
 return_call constant-stack gate.

 Two real findings the process surfaced (worth noting for review): the static-table insufficiency (revised to
 runtime plg_rt_atom_name) and the cross-module cache conflation (scoped via WeakMap). Both were caught by the
 cyclic-term test case and the two-module driver respectively — exactly what the verification was for.

 The design doc docs/design/WASM_HOST_GLUE.md records the decisions; once merged, per the myspec convention it
 moves to docs/design/done/ and the feature gets a first-class doc (the wasm-worker guide) — your call on timing
 and git.
navicore deleted branch wasmplus 2026-07-04 14:10:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/patch-prolog!43
No description provided.