Compile your JS to WASM ahead of time. No rewrite, no lock-in. Same source, 2.5× faster. For DSP, visuals, numerics and more.
Compile your JS to WASM ahead of time. No rewrite, no lock-in. Same source, 2.5× faster. For DSP, visuals, numerics and more.
A compiler for a distilled JavaScript subset — Crockford’s “good parts”.
Valid JZ is valid JS. Same source runs as plain JS or compiles to .wasm – sandboxed, portable, memory-safe. No runtime, no GC, no type annotations, auto-SIMD, deterministic output.
| Good for | Not for |
|---|---|
| DSP, audio, synthesis | UI, DOM, the frontend |
| Image, video, pixels | Servers, APIs, I/O |
| Simulation, physics, games | Async, promises, events |
| Parsers, codecs, compression | Dynamic, polymorphic, OOP |
| Scientific, numeric, ML | Security crypto, big-ints |
| Hashing, checksums, RNG | Glue, plumbing, orchestration |
A minimal modern functional JS subset – no async, dynamic constructs or OOP. Compat layer enables some legacy APIs.
let x = 0.5, Float32Array, index, counter in a loop — you know the types without being told, and so does JZ. Annotations add nothing a reader (or a model) can’t already
see; they just smear a second language onto a program logic. Anything dynamic falls back to a slower, always-correct path.AssemblyScript is a TypeScript dialect — can’t run in a JS engine. Porffor chases the whole JS spec that affects performance and cannot compile itself yet.
A matter of preference. JS is more common – if you can compile it to WASM or native with comparable performance — why second language to keep in sync?
Same source, over 2× faster than V8 at near-native speed — geomean across the bench corpus (chart below; per-case numbers on the bench page), also ahead of Rust→wasm and AssemblyScript→wasm. JZ auto-vectorizes (SIMD) where the Rust/C→wasm paths don’t; a few cases Rust native vectorizes better — a limitation of WASM.
If you hit a slow case, report it →
jz → wasm2c → clang -O3 produces a standalone native binary. See full pipeline →.
jz.wasm, and CI passes self-compiled build the full test suite. It’s experimental (pre-1.0) — ABI can still shift.
But: CI gates the full suite, test262, the bench, and the self-compile. A fuzzer diffs every kernel against the same source in V8.
jz kernel.js) or the API (compile()) produces a plain .wasm you load like any other module. Setup & options →