Get Started
Install
React
Vue
Svelte
Vanilla JS
The WASM binary is embedded in the package — no extra setup required.
It is decoded and compiled once per copy of @wterm/core, including concurrent
loads. Each terminal still gets its own instance and memory.
Quick Start
React
Vue
Svelte
Vanilla JS
Serving WASM separately
By default the ~49 KB WASM binary is embedded in the package and imported when
the built-in core is first loaded. Bundlers with code splitting emit it in a
separate JavaScript chunk, so deploy all emitted application assets. Ghostty and
custom wasmUrl loads do not request that chunk. To serve it as a separate static file instead (for caching or CDN), copy it from the package and pass wasmUrl:
Loads of the same resolved URL share the download and compiled module. The
built-in loader retains up to four recently used URLs per copy of @wterm/core
in a page or worker, separately from its embedded module. Failed downloads and
compilations can be retried. Use versioned or hashed URLs when updating the
binary; cached modules remain until eviction or page/worker reload.
Serve Content-Type: application/wasm to compile during download in supported
browsers. Other MIME types, unavailable streaming, or streaming failures fall
back to buffered compilation without fetching the file again.
Building the WASM Binary
Requires Zig 0.16.0
The build writes zig-out/bin/wterm.wasm and web/wterm.wasm. The packages ship
packages/@wterm/core/wasm/wterm.wasm. Copy the build there, then run
pnpm --filter @wterm/core build to regenerate the embedded binary that loads
when wasmUrl is not set.