@as-harness/js
v0.6.0
Published
Portable JavaScript host for the shared runtime contract.
Readme
harness/js
Portable JavaScript host for the shared runtime contract.
Purpose
- no native addon
- no per-platform binary artifact
- easiest starting point for ABI validation and implementation reference
- published as
@as-harness/jsand used directly by@as-harness/cli
Surface
createHarness(bytes) returns a shared Harness instance with:
discover/runstage/replay byNodeIndexstart()orchestration through shared deterministic planning plus same-machine worker slots- event callbacks and report-tree aggregation
- coverage collection merge/snapshot reset
- explicit
close()
Responsibilities
- validate and instantiate Wasm
- decode
write_event(...)payloads - trap observation via trampoline boundary
trace(...)interception →logevents- structured debug payload decoding for rewritten
abort(...)/trace(...)events - emit merged coverage snapshots when guest declares coverage
Testing and Notes
- shared host smoke suites are shared with
wazeroandwasmtime. - package-local extra checks focus on JS-specific
start()scheduling and report-shape behavior.
cd harness/js
npm test