JS to WASM compiler
http://jz.js.org/ โ HEALTH ? 95 / Healthy
JS to WASM compiler
http://jz.js.org/ โ// readme
JZ (javascript zero) compiles JavaScript to fast, minimal WASM.
site / guide / try it / examples / benchmarks
| Good for | Not for |
|---|---|
| DSP, audio, synthesis | UI, DOM, frontend state |
| Images, video, pixels | Network, hot I/O, serving HTTP |
| Simulation, physics, games | Dynamic object models and monkey-patching |
| Parsers, codecs, compression | Allocation-heavy, long-lived object graphs |
| Scientific, numeric, edge ML | Security-sensitive cryptography and arbitrary-precision integers |
| Hashing, checksums, RNG | Tiny calls where the JS/WASM boundary dominates |
npm install jz
import jz from 'jz'
const { exports } = jz`export const square = x => x * x`
exports.square(7) // 49
jz(source, opts) compiles and instantiates. compile(source, opts) returns the wasm, and
instantiate(wasm, { imports, memory, wasi })โฆ