// readme

JZ (javascript zero) compiles JavaScript to fast, minimal WASM.

site / guide / try it / examples / benchmarks

Good forNot for
DSP, audio, synthesisUI, DOM, frontend state
Images, video, pixelsNetwork, hot I/O, serving HTTP
Simulation, physics, gamesDynamic object models and monkey-patching
Parsers, codecs, compressionAllocation-heavy, long-lived object graphs
Scientific, numeric, edge MLSecurity-sensitive cryptography and arbitrary-precision integers
Hashing, checksums, RNGTiny calls where the JS/WASM boundary dominates

Usage

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 })โ€ฆ