ReviewOS

zig-utils/zig-js

WebAssembly profile: threads, shared memory, and atomics

#265
Closed chris opened this 9 days ago ·
9 days ago

Parent: #142 Related: #1, #49 Depends on: #262 Roadmap: #134

Implement the pinned WebAssembly threads profile against zig-js's no-GIL runtime.

Acceptance:

  • Pin the threads/shared-memory proposal revision and test inventory.
  • Implement shared memories, atomic instructions, wait/notify, validation, traps, and JavaScript API integration.
  • Define ownership/lifetime across Context, Thread, and Worker boundaries.
  • Pass deterministic concurrency, stress, leak, and ThreadSanitizer gates.
  • Publish per-profile upstream totals and scaling evidence by host/architecture.

Child issue map

  • #284 — exact atomic opcode inventory, decode, and validation
  • #285 — shared Memory backing and JavaScript API ownership
  • #286 — atomic execution, wait/notify, and fence
  • #287 — upstream corpus, TSan, and scaling evidence
    • #315 — synchronized Memory wrapper growth publication (landed; awaiting replacement full CI)

Implementation order

The executable profile and complete zero-hidden-skip proposal corpus are green through #287: all 551/551 commands across 13 pinned files pass in the production-default no-GIL evaluator. #287 now owns the remaining sanitizer/lifecycle matrix, architecture coverage, and reproducible scaling/system-engine evidence. This parent closes only after that terminal evidence is committed and published.

9 days ago

#285 is complete at a62e0c5/e321f04. Stable shared backing, proposal-exact fixed historical buffers, import sharedness, concurrent grow, Context Thread visibility, and isolated Worker structured-clone ownership are implemented and documented. The parent now advances to #286 atomic execution/wait/notify; #287 remains the terminal corpus, TSan, architecture, and scaling gate.

9 days ago

Execution child #286 is complete and closed: exact threads/atomic.wast is 372/372, the full unit root is 1,069/1,069 with zero skips/failures/leaks, and focused overlapping ordinary/atomic TSan witnesses are clean. The remaining parent gates are intentionally concentrated in #287: proposal-script execution, complete inventory/CI, full TSan/lifecycle matrix, and scaling/system-engine evidence.

9 days ago

#287 corpus milestone: the pinned proposal is now executable end to end at 551/551 across all 13 files with zero hidden skips/errors (d8319174, documented in bf258e90). Proposal-script runner and exact-pin CI acceptance are complete; this parent remains open for #287's TSan/host and scaling evidence.

9 days ago

Threads performance evidence is now published: #287 has 105 raw samples over 15 scored rows (1 and 2/4/8 workers), an explicit system-JSC support boundary, README/docs reproduction, and a focused exact-kernel lifecycle gate green both normally and under TSan (3/3, zero leaks). The remaining blocker is #287's wider supported-host stress/TSan matrix.

9 days ago

The memory-wrapper growth publication blocker #315 is complete in 7650986 with a fully green 40-job acceptance run: https://github.com/zig-utils/zig-js/actions/runs/29697559754. All four no-GIL TSan corpus shards passed; #265 remains open for its remaining profile-level gates.

9 days ago

Completed through #287 and #315. Threads is terminal at 551/551, the no-GIL ownership/runtime and complete TSan/stress/lifecycle matrix are green, and the 1–8 worker scaling evidence plus system-JSC boundary are published.

Sign in to comment on this issue.