Function: newQuickJSAsyncWASMModuleFromVariant()
February 16, 2026 ยท View on GitHub
quickjs-emscripten / quickjs-emscripten-core / newQuickJSAsyncWASMModuleFromVariant
Function: newQuickJSAsyncWASMModuleFromVariant()
newQuickJSAsyncWASMModuleFromVariant(
variantOrPromise):Promise<QuickJSAsyncWASMModule>
Defined in: packages/quickjs-emscripten-core/src/from-variant.ts:76
Create a new, completely isolated WebAssembly module containing a version of the QuickJS library compiled with Emscripten's ASYNCIFY transform.
This version of the library offers features that enable synchronous code inside the VM to interact with asynchronous code in the host environment. See the documentation on QuickJSAsyncWASMModule, QuickJSAsyncRuntime, and QuickJSAsyncContext.
Note that there is a hard limit on the number of WebAssembly modules in older versions of v8: https://bugs.chromium.org/p/v8/issues/detail?id=12076
Contents
Parameters
variantOrPromise
PromisedDefault<QuickJSAsyncVariant>
A QuickJSAsyncVariant to construct the WebAssembly module.
Returns
Promise<QuickJSAsyncWASMModule>
Example
const quickjs = new newQuickJSAsyncWASMModuleFromVariant(
import('@jitl/quickjs-browser-debug-asyncify-wasm')
)