vortex documentation
Every page here is generated from the markdown in the repository's docs/ directory, so it says what the source says.
- Compatibility with piscina 5.3.2: Vortex is a drop-in replacement for piscina 5.3.2. piscina's own test suite runs unmodified against vortex (compat/piscina-5.3.2/, files pinned by compat/piscina-5.3.2.sha256): Result on Node.js…
- vortex: design: vortex is a worker thread pool whose core (queues, scheduling, worker accounting, backpressure, timing) is Rust compiled to wasm32-unknown-unknown with shared memory, and whose public interface is a…
- 1. The interface vortex matches: vortex matches piscina 5.3.2 (npm latest on 2026-11-27; tag v5.3.2, commit 6c7e54630a8c28a96ce5c0625b463d849d21171c; engines.node >= 20). Source of truth for this chapter is that tag's src/ and the…
- 2. Architecture: One WebAssembly.Memory({shared: true}) is created by the main thread, passed to each worker once at startup (the only per-worker postMessage in steady state besides fallbacks), and every thread…
- 3. Where the speed comes from: Everything here is a hypothesis until the phase-3 harness measures it (load < 15 written beside every number). The first act of phase 2 is a per-task cost breakdown of piscina itself, so effort goes…
- 4. Proof plan: Mechanism: copy test/ and test/fixtures/ from tag v5.3.2 into compat/piscina-5.3.2/ byte-for-byte (sha256 manifest committed beside them, MIT licence notice kept), and resolve their imports…
- 5. Phased plan and owner questions: Sizes: S ≈ half a day, M ≈ 1–2 days, L ≈ 3–5 days of lane time. Vortex is the lowest priority on the machine: builds only when load < 30, never a release lane's build slot or the hook lock;…
- 6. Where piscina 5.3.2 spends per-task time (profile, phase 2a): These are CPU-profile shares, not benchmark results. Nothing here is a throughput claim. Tools: tools/profile-piscina/run.cjs (drives empty tasks) and tools/profile-piscina/analyze.cjs (self-time…
- 7. The Rust core as built (phase 2b): Crates: crates/vortex-core: no_std, no allocator, no thread_local!, no I/O. Waiting goes through the Futex trait and time arrives through the Clock trait or as now_us arguments (SBIO). Every…
- 8. The Node.js shim as built (phase 2c): The shim is strict TypeScript in js/src/, compiled to CommonJS in dist/ (as piscina ships), plus a generated dist/esm-wrapper.mjs. It passes piscina 5.3.2's suite unmodified; COMPAT.md lists every…
- 09 — Phase 3 benchmarks: Branch phase-3-bench. Harness: bench/ (cell, run, report, impls, mini/). Raw data: bench/results/bench-results-t{4,8}.jsonl, one line per cell with the Node version, CPU and 1-min load before and…
- 10. Core specification: one layout, two cores: The shim talks to a pool's shared region only through CoreApi (js/src/core/api.ts). Two cores implement it over the layout and protocol below: This chapter is the single source of truth.…