Demo compiling in your browser…
Demo compiling in your browser…
JZ compiles JavaScript to WASM at native speed.
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, frontend |
| Images, video, pixels | Network, hot I/O, serving |
| Simulation, physics, games | Dynamic objects, monkey-patching |
| Parsers, codecs, compression | Allocation-heavy, long-lived states |
| Scientific, numeric, edge ML | Security, cryptography, arbitrary-precision integers |
| Hashing, checksums, RNG | Tiny calls where the JS/WASM boundary dominates |
jz kernel.js) or the API (compile()) produces a plain .wasm you load like any other module. Setup & options →Faster than V8 and AssemblyScript on almost every kernel we measure, about 2× on average. Every number, and every loss, is on the bench page.
If you hit a slow case, report it →
WASM isn’t magically faster: V8 also compiles hot JS to machine code. But V8 has to stay ready for any JavaScript, so every hot loop carries checks and a garbage collector. JZ sees the whole program before it runs: fixed layouts, direct calls, no GC, and SIMD on loops V8 leaves scalar.
What's supported: classes, generators, async/await, destructuring, BigInt, typed arrays, Map/Set, RegExp, Date, JSON, timers.
What differs: no GC (call memory.reset()), 64-bit BigInt, compile-time regexes, ASCII case and UTC dates. Details →
let x = 0.5, Float32Array, an array index, a loop counter. JZ infers it instead of turning the file into another language. Ambiguous values take a slower dynamic path.Porffor aims at the full spec but emits no WASM and runs slower than V8 on the cases it completes. AssemblyScript compiles a typed TypeScript dialect; its WASM runs about 2× behind JZ on the corpus. scriptc makes native binaries from TypeScript, no WASM.
Rust, C, Zig and Go compiled to WASM run about 2× behind JZ by geomean, Go’s over 4×; as native binaries only C is level. If it is already Rust, keep it in Rust. If it is JavaScript, a rewrite buys a second toolchain and test suite for slower WASM.
jz → wasm2c → clang -O3 produces a standalone native binary. See full pipeline →.
jz.wasm. CI checks the wasm-hosted compiler against the test suite. It’s experimental (pre-1.0) – ABI can still shift.
But real code already ships on it: color-space v3 builds its precompiled 27-space WASM backend with JZ.
And the exit is free: valid JZ is valid JS – drop the compile step and the same file keeps running.