quickjs-emscripten • @jitl/quickjs-ng-wasmfile-debug-asyncify • Readme | Exports
quickjs-emscripten / @jitl/quickjs-ng-wasmfile-debug-asyncify
const
default:QuickJSAsyncVariant
Docs | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.
Variable | Setting | Description |
---|---|---|
library | quickjs-ng | quickjs-ng is a fork of quickjs that tends to add features more quickly. Version git+7ded62c5 vendored to quickjs-emscripten on 2024-02-12. |
releaseMode | debug | Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. |
syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The QuickJSAsyncRuntime and QuickJSAsyncContext classes expose the ASYNCIFY-specific APIs. |
emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |
exports | require import browser workerd | Has these package.json export conditions |
Generated using typedoc-plugin-markdown and TypeDoc