quickjs-wasi
3.7.0 · 13 Nov 2026MIT14.3M / weekRepositoryHomepagenpmAtom feed
3.7.0 is the newest release of 3.x.
In short
1 breaking5 new
- Breaking
Stop performing implicit filesystem I/O. The caller is now always responsible for providing the WASM bytes (or a pre-compiled
WebAssembly.Module) for both the main runtime and any native extensions, using whichever loading mechanism is appropriate for their environment (fetch(),node:fs/promises, bundler imports, etc.).
Release note
Major Changes
- Breaking
Stop performing implicit filesystem I/O. The caller is now always responsible for providing the WASM bytes (or a pre-compiled
WebAssembly.Module) for both the main runtime and any native extensions, using whichever loading mechanism is appropriate for their environment (fetch(),node:fs/promises, bundler imports, etc.).Main runtime
The
wasmoption onQuickJS.create()/QuickJS.restore()is now required — the previousnode:fs/promisesfallback has been removed. A newquickjs-wasi/quickjs.wasmsubpath export points to the published.wasmbinary so callers can resolve it through their bundler or runtime.Extensions
The Node-only convenience wrappers (
quickjs-wasi/url,quickjs-wasi/encoding,quickjs-wasi/base64,quickjs-wasi/headers,quickjs-wasi/crypto,quickjs-wasi/structured-clone) have been removed. Each extension's compiled.sois now exposed directly viaquickjs-wasi/<name>.so(e.g.quickjs-wasi/url.so,quickjs-wasi/crypto.so) so it can be loaded the same way as the main runtime.Migration
// Before import { QuickJS } from "quickjs-wasi"; import { urlExtension } from "quickjs-wasi/url"; const vm = await QuickJS.create({ extensions: [urlExtension] }); // After (Node) import { readFile } from "node:fs/promises"; import { QuickJS } from "quickjs-wasi"; const wasm = await readFile( new URL(import.meta.resolve("quickjs-wasi/quickjs.wasm")) ); const urlSo = await readFile( new URL(import.meta.resolve("quickjs-wasi/url.so")) ); const vm = await QuickJS.create({ wasm, extensions: [{ name: "url", wasm: urlSo }], }); // After (Vite / bundlers) import wasmUrl from "quickjs-wasi/quickjs.wasm?url"; import urlSoUrl from "quickjs-wasi/url.so?url"; const wasm = await WebAssembly.compileStreaming(fetch(wasmUrl)); const urlSo = await fetch(urlSoUrl).then((r) => r.arrayBuffer()); const vm = await QuickJS.create({ wasm, extensions: [{ name: "url", wasm: urlSo }], });
Minor Changes
Update QuickJS-ng from v0.13.0 to v0.15.0 (bumps through v0.14.0). Highlights:
atob()/btoa()are now native built-ins. They are controlled by a newIntrinsics.ATOB_BTOAflag, included inIntrinsics.ALLby default. Enabling this intrinsic also pulls inDOMException(errors thrown by these functions areDOMExceptioninstances).Uint8Arraybase64/hex methods (toBase64,fromBase64,toHex,fromHex,setFromBase64,setFromHex) are now part of the nativeTypedArraysintrinsic.Explicit Resource Management (
using/await usingin JavaScript) is now supported in the embedded VM.New C API:
JS_GetPendingJobContext,JS_IsAsyncFunction,JS_NewUint64, support for byte imports in modules,JSON.parsesource text access.Bug fixes for
Iterator.concatreentrancy, fast array UAF + overflow, property set extensibility checks, atom leaks inJS_NewSymbol, big-endian builds, and stack-trace line numbers aroundfor/ofcleanup.
Breaking —
base64extension removed. Thequickjs-wasi/base64.sosubpath export has been deleted because every feature it provided is now native in the runtime. To migrate, drop the extension from yourextensionsarray —atob,btoa, and theUint8Arraybase64/hex methods are available unconditionally (assuming you have not disabledIntrinsics.ATOB_BTOAorIntrinsics.TYPED_ARRAYS).The WASM toolchain also bumps to wasi-sdk 32 (clang 22.1.0).
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.