diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a232e62f..ad424cc4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -78,6 +78,9 @@ jobs: - name: Build tarballs run: yarn tarball && du -h build/tar/* + - name: Test release with NodeJS minimal ESModule example + run: ./scripts/smoketest-node-minimal.ts + - name: Test release with NodeJS/Typescript example run: ./scripts/smoketest-node.ts diff --git a/.prettierignore b/.prettierignore index 3d241753..d5834b6b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ ts/generated quickjs .yarn +.* doc json-generator-dot-com-1024-rows.json dist diff --git a/README.md b/README.md index 1cb43bd4..3b2f0c6f 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,13 @@ main() - [Async module loader](#async-module-loader) - [Async on host, sync in QuickJS](#async-on-host-sync-in-quickjs) - [Testing your code](#testing-your-code) - - [Using in the browser without a build step](#using-in-the-browser-without-a-build-step) - - [quickjs-emscripten-core, variants, and advanced packaging](#quickjs-emscripten-core-variants-and-advanced-packaging) + - [Packaging](#packaging) + - [Reducing package size](#reducing-package-size) + - [WebAssembly loading](#webassembly-loading) + - [Using in the browser without a build step](#using-in-the-browser-without-a-build-step) - [Debugging](#debugging) + - [Supported Platforms](#supported-platforms) - [More Documentation](#more-documentation) - - [Requirements](#requirements) - [Background](#background) - [Status \& Roadmap](#status--roadmap) - [Related](#related) @@ -515,7 +517,105 @@ For more testing examples, please explore the typescript source of [quickjs-emsc [debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/exports.md#debug_sync [testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md -### Using in the browser without a build step +### Packaging + +The main `quickjs-emscripten` package includes several build variants of the WebAssembly module: + +- `RELEASE...` build variants should be used in production. They offer better performance and smaller file size compared to `DEBUG...` build variants. + - `RELEASE_SYNC`: This is the default variant used when you don't explicitly provide one. It offers the fastest performance and smallest file size. + - `RELEASE_ASYNC`: The default variant if you need [asyncify][] magic, which comes at a performance cost. See the asyncify docs for details. +- `DEBUG...` build variants can be helpful during development and testing. They include source maps and assertions for catching bugs in your code. We recommend running your tests with _both_ a debug build variant and the release build variant you'll use in production. + - `DEBUG_SYNC`: Instrumented to detect memory leaks, in addition to assertions and source maps. + - `DEBUG_ASYNC`: An [asyncify][] variant with source maps. + +To use a variant, call `newQuickJSWASMModule` or `newQuickJSAsyncWASMModule` with the variant object. These functions return a promise that resolves to a [QuickJSWASMModule](./doc/quickjs-emscripten/classes/QuickJSWASMModule.md), the same as `getQuickJS`. + +```typescript +import { + newQuickJSWASMModule, + newQuickJSAsyncWASMModule, + RELEASE_SYNC, + DEBUG_SYNC, + RELEASE_ASYNC, + DEBUG_ASYNC, +} from "quickjs-emscripten" + +const QuickJSReleaseSync = await newQuickJSWASMModule(RELEASE_SYNC) +const QuickJSDebugSync = await newQuickJSWASMModule(DEBUG_SYNC) +const QuickJSReleaseAsync = await newQuickJSAsyncWASMModule(RELEASE_ASYNC) +const QuickJSDebugAsync = await newQuickJSAsyncWASMModule(DEBUG_ASYNC) + +for (const quickjs of [ + QuickJSReleaseSync, + QuickJSDebugSync, + QuickJSReleaseAsync, + QuickJSDebugAsync, +]) { + const vm = quickjs.newContext() + const result = vm.unwrapResult(vm.evalCode("1 + 1")).consume(vm.getNumber) + console.log(result) + vm.dispose() + quickjs.dispose() +} +``` + +#### Reducing package size + +Including 4 different copies of the WebAssembly module in the main package gives it an install size of [about 9.04mb](https://packagephobia.com/result?p=quickjs-emscripten). If you're building a CLI package or library of your own, or otherwise don't need to include 4 different variants in your `node_modules`, you can switch to the `quickjs-emscripten-core` package, which contains only the Javascript code for this library, and install one (or more) variants a-la-carte as separate packages. + +The most minimal setup would be to install `quickjs-emscripten-core` and `@jitl/quickjs-wasmfile-release-sync` (1.3mb total): + +```bash +yarn add quickjs-emscripten-core @jitl/quickjs-wasmfile-release-sync +du -h node_modules +# 640K node_modules/@jitl/quickjs-wasmfile-release-sync +# 80K node_modules/@jitl/quickjs-ffi-types +# 588K node_modules/quickjs-emscripten-core +# 1.3M node_modules +``` + +Then, you can use quickjs-emscripten-core's `newQuickJSWASMModuleFromVariant` to create a QuickJS module (see [the minimal example][minimal]): + +```typescript +// src/quickjs.mjs +import { newQuickJSWASMModuleFromVariant } from "quickjs-emscripten-core" +import RELEASE_SYNC from "@jitl/quickjs-wasmfile-release-sync" +export const QuickJS = await newQuickJSWASMModuleFromVariant(RELEASE_SYNC) + +// src/app.mjs +import { QuickJS } from "./quickjs.mjs" +console.log(QuickJS.evalCode("1 + 1")) +``` + +See the [documentation of quickjs-emscripten-core][core] for more details and the list of variant packages. + +[core]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten-core/README.md + +#### WebAssembly loading + +To run QuickJS, we need to load a WebAssembly module into the host Javascript runtime's memory (usually as an ArrayBuffer or TypedArray) and [compile it](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/instantiate_static) to a [WebAssembly.Module](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Module). This means we need to find the file path or URI of the WebAssembly module, and then read it using an API like `fetch` (browser) or `fs.readFile` (NodeJS). `quickjs-emscripten` tries to handle this automatically using patterns like `new URL('./local-path', import.meta.url)` that work in the browser or are handled automatically by bundlers, or `__dirname` in NodeJS, but you may need to configure this manually if these don't work in your environment, or you want more control about how the WebAssembly module is loaded. + +To customize the loading of an existing variant, create a new variant with your loading settings using `newVariant`, passing [CustomizeVariantOptions][newVariant]. For example, you need to customize loading in Cloudflare Workers (see [the full example][cloudflare]). + +```typescript +import { newQuickJSWASMModule, DEBUG_SYNC as baseVariant, newVariant } from "quickjs-emscripten" +import cloudflareWasmModule from "./DEBUG_SYNC.wasm" +import cloudflareWasmModuleSourceMap from "./DEBUG_SYNC.wasm.map.txt" + +/** + * We need to make a new variant that directly passes the imported WebAssembly.Module + * to Emscripten. Normally we'd load the wasm file as bytes from a URL, but + * that's forbidden in Cloudflare workers. + */ +const cloudflareVariant = newVariant(baseVariant, { + wasmModule: cloudflareWasmModule, + wasmSourceMapData: cloudflareWasmModuleSourceMap, +}) +``` + +[newVariant]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md + +#### Using in the browser without a build step You can use quickjs-emscripten directly from an HTML file in two ways: @@ -548,16 +648,6 @@ You can use quickjs-emscripten directly from an HTML file in two ways: ``` -### quickjs-emscripten-core, variants, and advanced packaging - -Them main `quickjs-emscripten` package includes several build variants of the WebAssembly module. -If these variants are too large for you, you can instead use the `quickjs-emscripten-core` package, -and manually select your own build variant. - -See the [documentation of quickjs-emscripten-core][core] for more details. - -[core]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten-core/README.md - ### Debugging - Switch to a DEBUG build variant of the WebAssembly module to see debug log messages from the C part of this library: @@ -595,24 +685,35 @@ See the [documentation of quickjs-emscripten-core][core] for more details. [setDebugMode]: doc/quickjs-emscripten/exports.md#setdebugmode -### More Documentation - -[Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] - -### Requirements +### Supported Platforms `quickjs-emscripten` and related packages should work in any environment that supports ES2020. -- NodeJS: requires v16.0.0 or later for WebAssembly compatibility. Tested with node@18. -- We estimate support for the following browsers: +- Browsers: we estimate support for the following browser versions. See the [global-iife][iife] and [esmodule][esm-html] HTML examples. - Chrome 63+ - Edge 79+ - Safari 11.1+ - Firefox 58+ +- NodeJS: requires v16.0.0 or later for WebAssembly compatibility. Tested with node@18. See the [node-typescript][tsx-example] and [node-minimal][minimal] examples. +- Typescript: tested with typescript@4.5.5 and typescript@5.3.3. See the [node-typescript example][tsx-example]. +- Vite: tested with vite@5.0.10. See the [Vite/Vue example][vite]. +- Create react app: tested with react-scripts@5.0.1. See the [create-react-app example][cra]. - Webpack: tested with webpack@5.89.0 via create-react-app. -- Vite: tested with vite@5.0.10. -- Typescript: tested with typescript@4.5.5 and typescript@5.3.3. -- Create react app: tested with react-scripts@5.0.1. +- Cloudflare Workers: tested with wrangler@3.22.1. See the [Cloudflare Workers example][cloudflare]. +- Deno: tested with deno 1.39.1. See the [Deno example][deno]. + +[iife]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/global-iife.html +[esm-html]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/esmodule.html +[deno]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/deno +[vite]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/vite-vue +[cra]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/create-react-app +[cloudflare]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/cloudflare-workers +[tsx-example]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/node-typescript +[minimal]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/node-minimal + +### More Documentation + +[Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] ## Background diff --git a/doc/@jitl/quickjs-ffi-types/exports.md b/doc/@jitl/quickjs-ffi-types/exports.md index 9df327cb..ee8f842f 100644 --- a/doc/@jitl/quickjs-ffi-types/exports.md +++ b/doc/@jitl/quickjs-ffi-types/exports.md @@ -37,12 +37,14 @@ - [EmscriptenModule](interfaces/EmscriptenModule.md) - [EmscriptenModuleLoader](interfaces/EmscriptenModuleLoader.md) +- [EmscriptenModuleLoaderOptions](interfaces/EmscriptenModuleLoaderOptions.md) - [QuickJSAsyncEmscriptenModule](interfaces/QuickJSAsyncEmscriptenModule.md) - [QuickJSAsyncFFI](interfaces/QuickJSAsyncFFI.md) - [QuickJSAsyncVariant](interfaces/QuickJSAsyncVariant.md) - [QuickJSEmscriptenModule](interfaces/QuickJSEmscriptenModule.md) - [QuickJSFFI](interfaces/QuickJSFFI.md) - [QuickJSSyncVariant](interfaces/QuickJSSyncVariant.md) +- [SourceMapData](interfaces/SourceMapData.md) ## Type Aliases @@ -55,7 +57,7 @@ for the Emscripten stack. #### Source -[ffi-types.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L77) +[packages/quickjs-ffi-types/src/ffi-types.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L77) *** @@ -65,7 +67,7 @@ for the Emscripten stack. #### Source -[variant-types.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L50) +[packages/quickjs-ffi-types/src/variant-types.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L50) *** @@ -75,7 +77,7 @@ for the Emscripten stack. #### Source -[emscripten-types.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L166) +[packages/quickjs-ffi-types/src/emscripten-types.ts:242](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L242) *** @@ -88,7 +90,7 @@ for the Emscripten stack. #### Source -[ffi-types.ts:89](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L89) +[packages/quickjs-ffi-types/src/ffi-types.ts:89](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L89) *** @@ -100,7 +102,7 @@ for the Emscripten stack. #### Source -[ffi-types.ts:19](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L19) +[packages/quickjs-ffi-types/src/ffi-types.ts:19](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L19) *** @@ -112,7 +114,7 @@ for the Emscripten stack. #### Source -[ffi-types.ts:24](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L24) +[packages/quickjs-ffi-types/src/ffi-types.ts:24](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L24) *** @@ -124,7 +126,7 @@ for the Emscripten stack. #### Source -[ffi-types.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L29) +[packages/quickjs-ffi-types/src/ffi-types.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L29) *** @@ -136,7 +138,7 @@ for the Emscripten stack. #### Source -[ffi-types.ts:14](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L14) +[packages/quickjs-ffi-types/src/ffi-types.ts:14](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L14) *** @@ -149,7 +151,7 @@ See JSValueConst and StaticJSValue. #### Source -[ffi-types.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L41) +[packages/quickjs-ffi-types/src/ffi-types.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L41) *** @@ -161,7 +163,7 @@ Used internally for Javascript-to-C function calls. #### Source -[ffi-types.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L51) +[packages/quickjs-ffi-types/src/ffi-types.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L51) *** @@ -174,7 +176,7 @@ See JSValue. #### Source -[ffi-types.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L35) +[packages/quickjs-ffi-types/src/ffi-types.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L35) *** @@ -186,7 +188,7 @@ Used internally for Javascript-to-C function calls. #### Source -[ffi-types.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L46) +[packages/quickjs-ffi-types/src/ffi-types.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L46) *** @@ -198,7 +200,7 @@ Opaque pointer that was allocated by js_malloc. #### Source -[ffi-types.ts:94](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L94) +[packages/quickjs-ffi-types/src/ffi-types.ts:94](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L94) *** @@ -211,7 +213,7 @@ for the Emscripten stack. #### Source -[ffi-types.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L83) +[packages/quickjs-ffi-types/src/ffi-types.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L83) *** @@ -223,7 +225,7 @@ Used internally for C-to-Javascript function calls. #### Source -[ffi-types.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L61) +[packages/quickjs-ffi-types/src/ffi-types.ts:61](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L61) *** @@ -235,7 +237,7 @@ Used internally for C-to-Javascript interrupt handlers. #### Source -[ffi-types.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L66) +[packages/quickjs-ffi-types/src/ffi-types.ts:66](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L66) *** @@ -247,7 +249,7 @@ Used internally for C-to-Javascript module loading. #### Source -[ffi-types.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L71) +[packages/quickjs-ffi-types/src/ffi-types.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L71) *** @@ -257,7 +259,7 @@ Used internally for C-to-Javascript module loading. #### Source -[variant-types.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L49) +[packages/quickjs-ffi-types/src/variant-types.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L49) ## Variables @@ -325,7 +327,7 @@ module code #### Source -[ffi-types.ts:99](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L99) +[packages/quickjs-ffi-types/src/ffi-types.ts:99](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L99) ## Functions @@ -358,7 +360,7 @@ module code #### Source -[ffi-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L106) +[packages/quickjs-ffi-types/src/ffi-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-types.ts#L106) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md index 87c07ecd..2cc8dcd8 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModule.md @@ -11,7 +11,7 @@ QuickJS. ## Contents -- [Extended By](EmscriptenModule.md#extended-by) +- [Extends](EmscriptenModule.md#extends) - [Properties](EmscriptenModule.md#properties) - [FAST\_MEMORY](EmscriptenModule.md#fast-memory) - [HEAP16](EmscriptenModule.md#heap16) @@ -24,18 +24,21 @@ QuickJS. - [HEAPU8](EmscriptenModule.md#heapu8) - [TOTAL\_MEMORY](EmscriptenModule.md#total-memory) - [TOTAL\_STACK](EmscriptenModule.md#total-stack) + - [wasmBinary?](EmscriptenModule.md#wasmbinary) - [Methods](EmscriptenModule.md#methods) - [UTF8ToString()](EmscriptenModule.md#utf8tostring) - [\_free()](EmscriptenModule.md#free) - [\_malloc()](EmscriptenModule.md#malloc) - [cwrap()](EmscriptenModule.md#cwrap) + - [instantiateWasm()?](EmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](EmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](EmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](EmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](EmscriptenModule.md#stringtoutf8) -## Extended By +## Extends -- [`QuickJSEmscriptenModule`](QuickJSEmscriptenModule.md) -- [`QuickJSAsyncEmscriptenModule`](QuickJSAsyncEmscriptenModule.md) +- [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) ## Properties @@ -45,7 +48,7 @@ QuickJS. #### Source -[emscripten-types.ts:88](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L88) +[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) *** @@ -55,7 +58,7 @@ QuickJS. #### Source -[emscripten-types.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L78) +[packages/quickjs-ffi-types/src/emscripten-types.ts:154](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L154) *** @@ -65,7 +68,7 @@ QuickJS. #### Source -[emscripten-types.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L79) +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) *** @@ -75,7 +78,7 @@ QuickJS. #### Source -[emscripten-types.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L77) +[packages/quickjs-ffi-types/src/emscripten-types.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L153) *** @@ -85,7 +88,7 @@ QuickJS. #### Source -[emscripten-types.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L83) +[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) *** @@ -95,7 +98,7 @@ QuickJS. #### Source -[emscripten-types.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L84) +[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) *** @@ -105,7 +108,7 @@ QuickJS. #### Source -[emscripten-types.ts:81](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L81) +[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) *** @@ -115,7 +118,7 @@ QuickJS. #### Source -[emscripten-types.ts:82](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L82) +[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) *** @@ -125,7 +128,7 @@ QuickJS. #### Source -[emscripten-types.ts:80](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L80) +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) *** @@ -135,7 +138,7 @@ QuickJS. #### Source -[emscripten-types.ts:87](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L87) +[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) *** @@ -145,7 +148,23 @@ QuickJS. #### Source -[emscripten-types.ts:86](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L86) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModuleLoaderOptions.wasmBinary`](EmscriptenModuleLoaderOptions.md#wasmbinary) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:103](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L103) ## Methods @@ -168,7 +187,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L64) +[packages/quickjs-ffi-types/src/emscripten-types.ts:140](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L140) *** @@ -186,7 +205,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:68](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L68) +[packages/quickjs-ffi-types/src/emscripten-types.ts:144](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L144) *** @@ -204,7 +223,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:67](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L67) +[packages/quickjs-ffi-types/src/emscripten-types.ts:143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L143) *** @@ -237,7 +256,33 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:69](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L69) +[packages/quickjs-ffi-types/src/emscripten-types.ts:145](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L145) + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModuleLoaderOptions.instantiateWasm`](EmscriptenModuleLoaderOptions.md#instantiatewasm) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L106) *** @@ -255,7 +300,75 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L65) +[packages/quickjs-ffi-types/src/emscripten-types.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L141) + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModuleLoaderOptions.locateFile`](EmscriptenModuleLoaderOptions.md#locatefile) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L96) + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModuleLoaderOptions.monitorRunDependencies`](EmscriptenModuleLoaderOptions.md#monitorrundependencies) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L112) *** @@ -280,7 +393,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -[emscripten-types.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L59) +[packages/quickjs-ffi-types/src/emscripten-types.ts:135](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L135) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md index c2d0b78a..a32c4968 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoader.md @@ -10,7 +10,11 @@ • **T** extends [`EmscriptenModule`](EmscriptenModule.md) -> **EmscriptenModuleLoader**(): `Promise`\<`T`\> +> **EmscriptenModuleLoader**(`options`?): `Promise`\<`T`\> + +## Parameters + +• **options?**: [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) ## Returns @@ -18,7 +22,7 @@ ## Source -[emscripten-types.ts:169](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L169) +[packages/quickjs-ffi-types/src/emscripten-types.ts:245](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L245) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoaderOptions.md b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoaderOptions.md new file mode 100644 index 00000000..4cc3b5ef --- /dev/null +++ b/doc/@jitl/quickjs-ffi-types/interfaces/EmscriptenModuleLoaderOptions.md @@ -0,0 +1,123 @@ +[quickjs-emscripten](../../../packages.md) • **@jitl/quickjs-ffi-types** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../../packages.md) / [@jitl/quickjs-ffi-types](../exports.md) / EmscriptenModuleLoaderOptions + +# Interface: EmscriptenModuleLoaderOptions + +This structure is defined by Emscripten. +It's possible to provide these parameters to an emscripten module loader. +See [the Emscripten Module API reference](https://emscripten.org/docs/api_reference/module.html). + +## Contents + +- [Extended By](EmscriptenModuleLoaderOptions.md#extended-by) +- [Properties](EmscriptenModuleLoaderOptions.md#properties) + - [wasmBinary?](EmscriptenModuleLoaderOptions.md#wasmbinary) +- [Methods](EmscriptenModuleLoaderOptions.md#methods) + - [instantiateWasm()?](EmscriptenModuleLoaderOptions.md#instantiatewasm) + - [locateFile()?](EmscriptenModuleLoaderOptions.md#locatefile) + - [monitorRunDependencies()?](EmscriptenModuleLoaderOptions.md#monitorrundependencies) + +## Extended By + +- [`EmscriptenModule`](EmscriptenModule.md) + +## Properties + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:103](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L103) + +## Methods + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L106) + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L96) + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L112) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md index a1add776..84e812dc 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncEmscriptenModule.md @@ -26,12 +26,16 @@ QuickJS. - [TOTAL\_STACK](QuickJSAsyncEmscriptenModule.md#total-stack) - [callbacks](QuickJSAsyncEmscriptenModule.md#callbacks) - [type](QuickJSAsyncEmscriptenModule.md#type) + - [wasmBinary?](QuickJSAsyncEmscriptenModule.md#wasmbinary) - [Methods](QuickJSAsyncEmscriptenModule.md#methods) - [UTF8ToString()](QuickJSAsyncEmscriptenModule.md#utf8tostring) - [\_free()](QuickJSAsyncEmscriptenModule.md#free) - [\_malloc()](QuickJSAsyncEmscriptenModule.md#malloc) - [cwrap()](QuickJSAsyncEmscriptenModule.md#cwrap) + - [instantiateWasm()?](QuickJSAsyncEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSAsyncEmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](QuickJSAsyncEmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](QuickJSAsyncEmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](QuickJSAsyncEmscriptenModule.md#stringtoutf8) ## Extends @@ -50,7 +54,7 @@ QuickJS. #### Source -[emscripten-types.ts:88](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L88) +[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) *** @@ -64,7 +68,7 @@ QuickJS. #### Source -[emscripten-types.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L78) +[packages/quickjs-ffi-types/src/emscripten-types.ts:154](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L154) *** @@ -78,7 +82,7 @@ QuickJS. #### Source -[emscripten-types.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L79) +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) *** @@ -92,7 +96,7 @@ QuickJS. #### Source -[emscripten-types.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L77) +[packages/quickjs-ffi-types/src/emscripten-types.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L153) *** @@ -106,7 +110,7 @@ QuickJS. #### Source -[emscripten-types.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L83) +[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) *** @@ -120,7 +124,7 @@ QuickJS. #### Source -[emscripten-types.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L84) +[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) *** @@ -134,7 +138,7 @@ QuickJS. #### Source -[emscripten-types.ts:81](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L81) +[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) *** @@ -148,7 +152,7 @@ QuickJS. #### Source -[emscripten-types.ts:82](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L82) +[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) *** @@ -162,7 +166,7 @@ QuickJS. #### Source -[emscripten-types.ts:80](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L80) +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) *** @@ -176,7 +180,7 @@ QuickJS. #### Source -[emscripten-types.ts:87](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L87) +[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) *** @@ -190,7 +194,7 @@ QuickJS. #### Source -[emscripten-types.ts:86](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L86) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -200,7 +204,7 @@ QuickJS. #### Source -[emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) +[packages/quickjs-ffi-types/src/emscripten-types.ts:239](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L239) *** @@ -214,7 +218,23 @@ Implement this field #### Source -[emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) +[packages/quickjs-ffi-types/src/emscripten-types.ts:238](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L238) + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.wasmBinary`](EmscriptenModule.md#wasmbinary) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:103](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L103) ## Methods @@ -241,7 +261,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L64) +[packages/quickjs-ffi-types/src/emscripten-types.ts:140](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L140) *** @@ -263,7 +283,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:68](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L68) +[packages/quickjs-ffi-types/src/emscripten-types.ts:144](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L144) *** @@ -285,7 +305,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:67](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L67) +[packages/quickjs-ffi-types/src/emscripten-types.ts:143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L143) *** @@ -322,7 +342,33 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:69](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L69) +[packages/quickjs-ffi-types/src/emscripten-types.ts:145](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L145) + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.instantiateWasm`](EmscriptenModule.md#instantiatewasm) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L106) *** @@ -344,7 +390,75 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L65) +[packages/quickjs-ffi-types/src/emscripten-types.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L141) + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.locateFile`](EmscriptenModule.md#locatefile) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L96) + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.monitorRunDependencies`](EmscriptenModule.md#monitorrundependencies) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L112) *** @@ -373,7 +487,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -[emscripten-types.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L59) +[packages/quickjs-ffi-types/src/emscripten-types.ts:135](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L135) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md index 1bb6767f..51d97428 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncFFI.md @@ -94,7 +94,7 @@ Set at compile time. #### Source -[ffi-async.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L33) +[packages/quickjs-ffi-types/src/ffi-async.ts:33](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L33) *** @@ -114,7 +114,7 @@ Set at compile time. #### Source -[ffi-async.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L193) +[packages/quickjs-ffi-types/src/ffi-async.ts:193](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L193) *** @@ -128,7 +128,7 @@ Set at compile time. #### Source -[ffi-async.ts:191](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L191) +[packages/quickjs-ffi-types/src/ffi-async.ts:191](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L191) *** @@ -142,7 +142,7 @@ Set at compile time. #### Source -[ffi-async.ts:190](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L190) +[packages/quickjs-ffi-types/src/ffi-async.ts:190](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L190) *** @@ -156,7 +156,7 @@ Set at compile time. #### Source -[ffi-async.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L41) +[packages/quickjs-ffi-types/src/ffi-async.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L41) *** @@ -182,7 +182,7 @@ Set at compile time. #### Source -[ffi-async.ts:143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L143) +[packages/quickjs-ffi-types/src/ffi-async.ts:143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L143) *** @@ -208,7 +208,7 @@ Set at compile time. #### Source -[ffi-async.ts:150](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L150) +[packages/quickjs-ffi-types/src/ffi-async.ts:150](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L150) *** @@ -242,7 +242,7 @@ Set at compile time. #### Source -[ffi-async.ts:132](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L132) +[packages/quickjs-ffi-types/src/ffi-async.ts:132](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L132) *** @@ -262,7 +262,7 @@ Set at compile time. #### Source -[ffi-async.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L158) +[packages/quickjs-ffi-types/src/ffi-async.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L158) *** @@ -282,7 +282,7 @@ Set at compile time. #### Source -[ffi-async.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L162) +[packages/quickjs-ffi-types/src/ffi-async.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L162) *** @@ -302,7 +302,7 @@ Set at compile time. #### Source -[ffi-async.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L55) +[packages/quickjs-ffi-types/src/ffi-async.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L55) *** @@ -328,7 +328,7 @@ Set at compile time. #### Source -[ffi-async.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L166) +[packages/quickjs-ffi-types/src/ffi-async.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L166) *** @@ -354,7 +354,7 @@ Set at compile time. #### Source -[ffi-async.ts:173](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L173) +[packages/quickjs-ffi-types/src/ffi-async.ts:173](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L173) *** @@ -376,7 +376,7 @@ Set at compile time. #### Source -[ffi-async.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L100) +[packages/quickjs-ffi-types/src/ffi-async.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L100) *** @@ -398,7 +398,7 @@ Set at compile time. #### Source -[ffi-async.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L105) +[packages/quickjs-ffi-types/src/ffi-async.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L105) *** @@ -418,7 +418,7 @@ Set at compile time. #### Source -[ffi-async.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L54) +[packages/quickjs-ffi-types/src/ffi-async.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L54) *** @@ -436,7 +436,7 @@ Set at compile time. #### Source -[ffi-async.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L50) +[packages/quickjs-ffi-types/src/ffi-async.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L50) *** @@ -454,7 +454,7 @@ Set at compile time. #### Source -[ffi-async.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L48) +[packages/quickjs-ffi-types/src/ffi-async.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L48) *** @@ -474,7 +474,7 @@ Set at compile time. #### Source -[ffi-async.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L51) +[packages/quickjs-ffi-types/src/ffi-async.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L51) *** @@ -494,7 +494,7 @@ Set at compile time. #### Source -[ffi-async.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L52) +[packages/quickjs-ffi-types/src/ffi-async.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L52) *** @@ -514,7 +514,7 @@ Set at compile time. #### Source -[ffi-async.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L53) +[packages/quickjs-ffi-types/src/ffi-async.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L53) *** @@ -534,7 +534,7 @@ Set at compile time. #### Source -[ffi-async.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L77) +[packages/quickjs-ffi-types/src/ffi-async.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L77) *** @@ -554,7 +554,7 @@ Set at compile time. #### Source -[ffi-async.ts:81](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L81) +[packages/quickjs-ffi-types/src/ffi-async.ts:81](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L81) *** @@ -568,7 +568,7 @@ Set at compile time. #### Source -[ffi-async.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L45) +[packages/quickjs-ffi-types/src/ffi-async.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L45) *** @@ -588,7 +588,7 @@ Set at compile time. #### Source -[ffi-async.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L71) +[packages/quickjs-ffi-types/src/ffi-async.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L71) *** @@ -606,7 +606,7 @@ Set at compile time. #### Source -[ffi-async.ts:184](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L184) +[packages/quickjs-ffi-types/src/ffi-async.ts:184](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L184) *** @@ -620,7 +620,7 @@ Set at compile time. #### Source -[ffi-async.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L44) +[packages/quickjs-ffi-types/src/ffi-async.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L44) *** @@ -642,7 +642,7 @@ Set at compile time. #### Source -[ffi-async.ts:110](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L110) +[packages/quickjs-ffi-types/src/ffi-async.ts:110](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L110) *** @@ -664,7 +664,7 @@ Set at compile time. #### Source -[ffi-async.ts:115](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L115) +[packages/quickjs-ffi-types/src/ffi-async.ts:115](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L115) *** @@ -684,7 +684,7 @@ Set at compile time. #### Source -[ffi-async.ts:73](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L73) +[packages/quickjs-ffi-types/src/ffi-async.ts:73](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L73) *** @@ -704,7 +704,7 @@ Set at compile time. #### Source -[ffi-async.ts:90](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L90) +[packages/quickjs-ffi-types/src/ffi-async.ts:90](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L90) *** @@ -724,7 +724,7 @@ Set at compile time. #### Source -[ffi-async.ts:94](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L94) +[packages/quickjs-ffi-types/src/ffi-async.ts:94](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L94) *** @@ -738,7 +738,7 @@ Set at compile time. #### Source -[ffi-async.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L46) +[packages/quickjs-ffi-types/src/ffi-async.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L46) *** @@ -752,7 +752,7 @@ Set at compile time. #### Source -[ffi-async.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L43) +[packages/quickjs-ffi-types/src/ffi-async.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L43) *** @@ -772,7 +772,7 @@ Set at compile time. #### Source -[ffi-async.ts:98](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L98) +[packages/quickjs-ffi-types/src/ffi-async.ts:98](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L98) *** @@ -790,7 +790,7 @@ Set at compile time. #### Source -[ffi-async.ts:99](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L99) +[packages/quickjs-ffi-types/src/ffi-async.ts:99](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L99) *** @@ -808,7 +808,7 @@ Set at compile time. #### Source -[ffi-async.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L64) +[packages/quickjs-ffi-types/src/ffi-async.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L64) *** @@ -830,7 +830,7 @@ Set at compile time. #### Source -[ffi-async.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L65) +[packages/quickjs-ffi-types/src/ffi-async.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L65) *** @@ -848,7 +848,7 @@ Set at compile time. #### Source -[ffi-async.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L49) +[packages/quickjs-ffi-types/src/ffi-async.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L49) *** @@ -866,7 +866,7 @@ Set at compile time. #### Source -[ffi-async.ts:36](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L36) +[packages/quickjs-ffi-types/src/ffi-async.ts:36](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L36) *** @@ -886,7 +886,7 @@ Set at compile time. #### Source -[ffi-async.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L70) +[packages/quickjs-ffi-types/src/ffi-async.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L70) *** @@ -908,7 +908,7 @@ Set at compile time. #### Source -[ffi-async.ts:192](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L192) +[packages/quickjs-ffi-types/src/ffi-async.ts:192](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L192) *** @@ -926,7 +926,7 @@ Set at compile time. #### Source -[ffi-async.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L59) +[packages/quickjs-ffi-types/src/ffi-async.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L59) *** @@ -946,7 +946,7 @@ Set at compile time. #### Source -[ffi-async.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L60) +[packages/quickjs-ffi-types/src/ffi-async.ts:60](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L60) *** @@ -966,7 +966,7 @@ Set at compile time. #### Source -[ffi-async.ts:185](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L185) +[packages/quickjs-ffi-types/src/ffi-async.ts:185](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L185) *** @@ -980,7 +980,7 @@ Set at compile time. #### Source -[ffi-async.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L47) +[packages/quickjs-ffi-types/src/ffi-async.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L47) *** @@ -1000,7 +1000,7 @@ Set at compile time. #### Source -[ffi-async.ts:72](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L72) +[packages/quickjs-ffi-types/src/ffi-async.ts:72](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L72) *** @@ -1022,7 +1022,7 @@ Set at compile time. #### Source -[ffi-async.ts:85](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L85) +[packages/quickjs-ffi-types/src/ffi-async.ts:85](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L85) *** @@ -1036,7 +1036,7 @@ Set at compile time. #### Source -[ffi-async.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L40) +[packages/quickjs-ffi-types/src/ffi-async.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L40) *** @@ -1056,7 +1056,7 @@ Set at compile time. #### Source -[ffi-async.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L157) +[packages/quickjs-ffi-types/src/ffi-async.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L157) *** @@ -1076,7 +1076,7 @@ Set at compile time. #### Source -[ffi-async.ts:38](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L38) +[packages/quickjs-ffi-types/src/ffi-async.ts:38](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L38) *** @@ -1094,7 +1094,7 @@ Set at compile time. #### Source -[ffi-async.ts:198](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L198) +[packages/quickjs-ffi-types/src/ffi-async.ts:198](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L198) *** @@ -1112,7 +1112,7 @@ Set at compile time. #### Source -[ffi-async.ts:200](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L200) +[packages/quickjs-ffi-types/src/ffi-async.ts:200](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L200) *** @@ -1130,7 +1130,7 @@ Set at compile time. #### Source -[ffi-async.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L39) +[packages/quickjs-ffi-types/src/ffi-async.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L39) *** @@ -1148,7 +1148,7 @@ Set at compile time. #### Source -[ffi-async.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L197) +[packages/quickjs-ffi-types/src/ffi-async.ts:197](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L197) *** @@ -1168,7 +1168,7 @@ Set at compile time. #### Source -[ffi-async.ts:199](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L199) +[packages/quickjs-ffi-types/src/ffi-async.ts:199](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L199) *** @@ -1188,7 +1188,7 @@ Set at compile time. #### Source -[ffi-async.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L42) +[packages/quickjs-ffi-types/src/ffi-async.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L42) *** @@ -1208,7 +1208,7 @@ Set at compile time. #### Source -[ffi-async.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L37) +[packages/quickjs-ffi-types/src/ffi-async.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L37) *** @@ -1232,7 +1232,7 @@ Set at compile time. #### Source -[ffi-async.ts:120](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L120) +[packages/quickjs-ffi-types/src/ffi-async.ts:120](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L120) *** @@ -1256,7 +1256,7 @@ Set at compile time. #### Source -[ffi-async.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L126) +[packages/quickjs-ffi-types/src/ffi-async.ts:126](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L126) *** @@ -1274,7 +1274,7 @@ Set at compile time. #### Source -[ffi-async.ts:189](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L189) +[packages/quickjs-ffi-types/src/ffi-async.ts:189](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L189) *** @@ -1294,7 +1294,7 @@ Set at compile time. #### Source -[ffi-async.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L35) +[packages/quickjs-ffi-types/src/ffi-async.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L35) *** @@ -1314,7 +1314,7 @@ Set at compile time. #### Source -[ffi-async.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L180) +[packages/quickjs-ffi-types/src/ffi-async.ts:180](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L180) *** @@ -1334,7 +1334,7 @@ Set at compile time. #### Source -[ffi-async.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L205) +[packages/quickjs-ffi-types/src/ffi-async.ts:205](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L205) *** @@ -1354,7 +1354,7 @@ Set at compile time. #### Source -[ffi-async.ts:201](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L201) +[packages/quickjs-ffi-types/src/ffi-async.ts:201](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi-async.ts#L201) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncVariant.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncVariant.md index f901cea2..aef45297 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncVariant.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSAsyncVariant.md @@ -36,7 +36,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -[variant-types.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L45) +[packages/quickjs-ffi-types/src/variant-types.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L45) *** @@ -50,7 +50,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -[variant-types.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L46) +[packages/quickjs-ffi-types/src/variant-types.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L46) *** @@ -60,7 +60,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -[variant-types.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L44) +[packages/quickjs-ffi-types/src/variant-types.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L44) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md index 075f7487..c8b2cad6 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSEmscriptenModule.md @@ -26,12 +26,16 @@ QuickJS. - [TOTAL\_STACK](QuickJSEmscriptenModule.md#total-stack) - [callbacks](QuickJSEmscriptenModule.md#callbacks) - [type](QuickJSEmscriptenModule.md#type) + - [wasmBinary?](QuickJSEmscriptenModule.md#wasmbinary) - [Methods](QuickJSEmscriptenModule.md#methods) - [UTF8ToString()](QuickJSEmscriptenModule.md#utf8tostring) - [\_free()](QuickJSEmscriptenModule.md#free) - [\_malloc()](QuickJSEmscriptenModule.md#malloc) - [cwrap()](QuickJSEmscriptenModule.md#cwrap) + - [instantiateWasm()?](QuickJSEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSEmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](QuickJSEmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](QuickJSEmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](QuickJSEmscriptenModule.md#stringtoutf8) ## Extends @@ -50,7 +54,7 @@ QuickJS. #### Source -[emscripten-types.ts:88](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L88) +[packages/quickjs-ffi-types/src/emscripten-types.ts:164](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L164) *** @@ -64,7 +68,7 @@ QuickJS. #### Source -[emscripten-types.ts:78](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L78) +[packages/quickjs-ffi-types/src/emscripten-types.ts:154](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L154) *** @@ -78,7 +82,7 @@ QuickJS. #### Source -[emscripten-types.ts:79](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L79) +[packages/quickjs-ffi-types/src/emscripten-types.ts:155](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L155) *** @@ -92,7 +96,7 @@ QuickJS. #### Source -[emscripten-types.ts:77](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L77) +[packages/quickjs-ffi-types/src/emscripten-types.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L153) *** @@ -106,7 +110,7 @@ QuickJS. #### Source -[emscripten-types.ts:83](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L83) +[packages/quickjs-ffi-types/src/emscripten-types.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L159) *** @@ -120,7 +124,7 @@ QuickJS. #### Source -[emscripten-types.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L84) +[packages/quickjs-ffi-types/src/emscripten-types.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L160) *** @@ -134,7 +138,7 @@ QuickJS. #### Source -[emscripten-types.ts:81](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L81) +[packages/quickjs-ffi-types/src/emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) *** @@ -148,7 +152,7 @@ QuickJS. #### Source -[emscripten-types.ts:82](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L82) +[packages/quickjs-ffi-types/src/emscripten-types.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L158) *** @@ -162,7 +166,7 @@ QuickJS. #### Source -[emscripten-types.ts:80](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L80) +[packages/quickjs-ffi-types/src/emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) *** @@ -176,7 +180,7 @@ QuickJS. #### Source -[emscripten-types.ts:87](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L87) +[packages/quickjs-ffi-types/src/emscripten-types.ts:163](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L163) *** @@ -190,7 +194,7 @@ QuickJS. #### Source -[emscripten-types.ts:86](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L86) +[packages/quickjs-ffi-types/src/emscripten-types.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L162) *** @@ -200,7 +204,7 @@ QuickJS. #### Source -[emscripten-types.ts:157](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L157) +[packages/quickjs-ffi-types/src/emscripten-types.ts:233](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L233) *** @@ -210,7 +214,23 @@ QuickJS. #### Source -[emscripten-types.ts:156](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L156) +[packages/quickjs-ffi-types/src/emscripten-types.ts:232](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L232) + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.wasmBinary`](EmscriptenModule.md#wasmbinary) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:103](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L103) ## Methods @@ -237,7 +257,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L64) +[packages/quickjs-ffi-types/src/emscripten-types.ts:140](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L140) *** @@ -259,7 +279,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:68](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L68) +[packages/quickjs-ffi-types/src/emscripten-types.ts:144](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L144) *** @@ -281,7 +301,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:67](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L67) +[packages/quickjs-ffi-types/src/emscripten-types.ts:143](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L143) *** @@ -318,7 +338,33 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:69](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L69) +[packages/quickjs-ffi-types/src/emscripten-types.ts:145](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L145) + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.instantiateWasm`](EmscriptenModule.md#instantiatewasm) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L106) *** @@ -340,7 +386,75 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -[emscripten-types.ts:65](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L65) +[packages/quickjs-ffi-types/src/emscripten-types.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L141) + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.locateFile`](EmscriptenModule.md#locatefile) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:96](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L96) + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`@jitl/quickjs-ffi-types.EmscriptenModule.monitorRunDependencies`](EmscriptenModule.md#monitorrundependencies) + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:112](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L112) *** @@ -369,7 +483,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -[emscripten-types.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L59) +[packages/quickjs-ffi-types/src/emscripten-types.ts:135](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L135) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md index cc31ca72..77e2ff8a 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSFFI.md @@ -87,7 +87,7 @@ Set at compile time. #### Source -[ffi.ts:32](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L32) +[packages/quickjs-ffi-types/src/ffi.ts:32](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L32) *** @@ -107,7 +107,7 @@ Set at compile time. #### Source -[ffi.ts:154](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L154) +[packages/quickjs-ffi-types/src/ffi.ts:154](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L154) *** @@ -121,7 +121,7 @@ Set at compile time. #### Source -[ffi.ts:152](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L152) +[packages/quickjs-ffi-types/src/ffi.ts:152](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L152) *** @@ -135,7 +135,7 @@ Set at compile time. #### Source -[ffi.ts:151](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L151) +[packages/quickjs-ffi-types/src/ffi.ts:151](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L151) *** @@ -149,7 +149,7 @@ Set at compile time. #### Source -[ffi.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L40) +[packages/quickjs-ffi-types/src/ffi.ts:40](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L40) *** @@ -175,7 +175,7 @@ Set at compile time. #### Source -[ffi.ts:122](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L122) +[packages/quickjs-ffi-types/src/ffi.ts:122](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L122) *** @@ -209,7 +209,7 @@ Set at compile time. #### Source -[ffi.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L111) +[packages/quickjs-ffi-types/src/ffi.ts:111](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L111) *** @@ -229,7 +229,7 @@ Set at compile time. #### Source -[ffi.ts:130](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L130) +[packages/quickjs-ffi-types/src/ffi.ts:130](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L130) *** @@ -249,7 +249,7 @@ Set at compile time. #### Source -[ffi.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L54) +[packages/quickjs-ffi-types/src/ffi.ts:54](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L54) *** @@ -275,7 +275,7 @@ Set at compile time. #### Source -[ffi.ts:134](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L134) +[packages/quickjs-ffi-types/src/ffi.ts:134](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L134) *** @@ -297,7 +297,7 @@ Set at compile time. #### Source -[ffi.ts:95](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L95) +[packages/quickjs-ffi-types/src/ffi.ts:95](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L95) *** @@ -317,7 +317,7 @@ Set at compile time. #### Source -[ffi.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L53) +[packages/quickjs-ffi-types/src/ffi.ts:53](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L53) *** @@ -335,7 +335,7 @@ Set at compile time. #### Source -[ffi.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L49) +[packages/quickjs-ffi-types/src/ffi.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L49) *** @@ -353,7 +353,7 @@ Set at compile time. #### Source -[ffi.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L47) +[packages/quickjs-ffi-types/src/ffi.ts:47](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L47) *** @@ -373,7 +373,7 @@ Set at compile time. #### Source -[ffi.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L50) +[packages/quickjs-ffi-types/src/ffi.ts:50](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L50) *** @@ -393,7 +393,7 @@ Set at compile time. #### Source -[ffi.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L51) +[packages/quickjs-ffi-types/src/ffi.ts:51](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L51) *** @@ -413,7 +413,7 @@ Set at compile time. #### Source -[ffi.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L52) +[packages/quickjs-ffi-types/src/ffi.ts:52](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L52) *** @@ -433,7 +433,7 @@ Set at compile time. #### Source -[ffi.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L76) +[packages/quickjs-ffi-types/src/ffi.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L76) *** @@ -453,7 +453,7 @@ Set at compile time. #### Source -[ffi.ts:80](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L80) +[packages/quickjs-ffi-types/src/ffi.ts:80](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L80) *** @@ -467,7 +467,7 @@ Set at compile time. #### Source -[ffi.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L44) +[packages/quickjs-ffi-types/src/ffi.ts:44](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L44) *** @@ -487,7 +487,7 @@ Set at compile time. #### Source -[ffi.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L70) +[packages/quickjs-ffi-types/src/ffi.ts:70](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L70) *** @@ -505,7 +505,7 @@ Set at compile time. #### Source -[ffi.ts:145](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L145) +[packages/quickjs-ffi-types/src/ffi.ts:145](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L145) *** @@ -519,7 +519,7 @@ Set at compile time. #### Source -[ffi.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L43) +[packages/quickjs-ffi-types/src/ffi.ts:43](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L43) *** @@ -541,7 +541,7 @@ Set at compile time. #### Source -[ffi.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L100) +[packages/quickjs-ffi-types/src/ffi.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L100) *** @@ -561,7 +561,7 @@ Set at compile time. #### Source -[ffi.ts:72](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L72) +[packages/quickjs-ffi-types/src/ffi.ts:72](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L72) *** @@ -581,7 +581,7 @@ Set at compile time. #### Source -[ffi.ts:89](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L89) +[packages/quickjs-ffi-types/src/ffi.ts:89](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L89) *** @@ -595,7 +595,7 @@ Set at compile time. #### Source -[ffi.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L45) +[packages/quickjs-ffi-types/src/ffi.ts:45](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L45) *** @@ -609,7 +609,7 @@ Set at compile time. #### Source -[ffi.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L42) +[packages/quickjs-ffi-types/src/ffi.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L42) *** @@ -629,7 +629,7 @@ Set at compile time. #### Source -[ffi.ts:93](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L93) +[packages/quickjs-ffi-types/src/ffi.ts:93](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L93) *** @@ -647,7 +647,7 @@ Set at compile time. #### Source -[ffi.ts:94](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L94) +[packages/quickjs-ffi-types/src/ffi.ts:94](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L94) *** @@ -665,7 +665,7 @@ Set at compile time. #### Source -[ffi.ts:63](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L63) +[packages/quickjs-ffi-types/src/ffi.ts:63](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L63) *** @@ -687,7 +687,7 @@ Set at compile time. #### Source -[ffi.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L64) +[packages/quickjs-ffi-types/src/ffi.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L64) *** @@ -705,7 +705,7 @@ Set at compile time. #### Source -[ffi.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L48) +[packages/quickjs-ffi-types/src/ffi.ts:48](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L48) *** @@ -723,7 +723,7 @@ Set at compile time. #### Source -[ffi.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L35) +[packages/quickjs-ffi-types/src/ffi.ts:35](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L35) *** @@ -743,7 +743,7 @@ Set at compile time. #### Source -[ffi.ts:69](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L69) +[packages/quickjs-ffi-types/src/ffi.ts:69](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L69) *** @@ -765,7 +765,7 @@ Set at compile time. #### Source -[ffi.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L153) +[packages/quickjs-ffi-types/src/ffi.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L153) *** @@ -783,7 +783,7 @@ Set at compile time. #### Source -[ffi.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L58) +[packages/quickjs-ffi-types/src/ffi.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L58) *** @@ -803,7 +803,7 @@ Set at compile time. #### Source -[ffi.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L59) +[packages/quickjs-ffi-types/src/ffi.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L59) *** @@ -823,7 +823,7 @@ Set at compile time. #### Source -[ffi.ts:146](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L146) +[packages/quickjs-ffi-types/src/ffi.ts:146](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L146) *** @@ -837,7 +837,7 @@ Set at compile time. #### Source -[ffi.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L46) +[packages/quickjs-ffi-types/src/ffi.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L46) *** @@ -857,7 +857,7 @@ Set at compile time. #### Source -[ffi.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L71) +[packages/quickjs-ffi-types/src/ffi.ts:71](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L71) *** @@ -879,7 +879,7 @@ Set at compile time. #### Source -[ffi.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L84) +[packages/quickjs-ffi-types/src/ffi.ts:84](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L84) *** @@ -893,7 +893,7 @@ Set at compile time. #### Source -[ffi.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L39) +[packages/quickjs-ffi-types/src/ffi.ts:39](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L39) *** @@ -913,7 +913,7 @@ Set at compile time. #### Source -[ffi.ts:129](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L129) +[packages/quickjs-ffi-types/src/ffi.ts:129](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L129) *** @@ -933,7 +933,7 @@ Set at compile time. #### Source -[ffi.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L37) +[packages/quickjs-ffi-types/src/ffi.ts:37](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L37) *** @@ -951,7 +951,7 @@ Set at compile time. #### Source -[ffi.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L159) +[packages/quickjs-ffi-types/src/ffi.ts:159](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L159) *** @@ -969,7 +969,7 @@ Set at compile time. #### Source -[ffi.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L161) +[packages/quickjs-ffi-types/src/ffi.ts:161](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L161) *** @@ -987,7 +987,7 @@ Set at compile time. #### Source -[ffi.ts:38](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L38) +[packages/quickjs-ffi-types/src/ffi.ts:38](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L38) *** @@ -1005,7 +1005,7 @@ Set at compile time. #### Source -[ffi.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L158) +[packages/quickjs-ffi-types/src/ffi.ts:158](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L158) *** @@ -1025,7 +1025,7 @@ Set at compile time. #### Source -[ffi.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L160) +[packages/quickjs-ffi-types/src/ffi.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L160) *** @@ -1045,7 +1045,7 @@ Set at compile time. #### Source -[ffi.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L41) +[packages/quickjs-ffi-types/src/ffi.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L41) *** @@ -1065,7 +1065,7 @@ Set at compile time. #### Source -[ffi.ts:36](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L36) +[packages/quickjs-ffi-types/src/ffi.ts:36](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L36) *** @@ -1089,7 +1089,7 @@ Set at compile time. #### Source -[ffi.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L105) +[packages/quickjs-ffi-types/src/ffi.ts:105](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L105) *** @@ -1107,7 +1107,7 @@ Set at compile time. #### Source -[ffi.ts:150](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L150) +[packages/quickjs-ffi-types/src/ffi.ts:150](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L150) *** @@ -1127,7 +1127,7 @@ Set at compile time. #### Source -[ffi.ts:34](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L34) +[packages/quickjs-ffi-types/src/ffi.ts:34](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L34) *** @@ -1147,7 +1147,7 @@ Set at compile time. #### Source -[ffi.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L141) +[packages/quickjs-ffi-types/src/ffi.ts:141](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L141) *** @@ -1167,7 +1167,7 @@ Set at compile time. #### Source -[ffi.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L166) +[packages/quickjs-ffi-types/src/ffi.ts:166](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L166) *** @@ -1187,7 +1187,7 @@ Set at compile time. #### Source -[ffi.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L162) +[packages/quickjs-ffi-types/src/ffi.ts:162](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/ffi.ts#L162) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSSyncVariant.md b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSSyncVariant.md index 7696dbd5..28b1756b 100644 --- a/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSSyncVariant.md +++ b/doc/@jitl/quickjs-ffi-types/interfaces/QuickJSSyncVariant.md @@ -36,7 +36,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -[variant-types.ts:30](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L30) +[packages/quickjs-ffi-types/src/variant-types.ts:30](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L30) *** @@ -50,7 +50,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -[variant-types.ts:31](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L31) +[packages/quickjs-ffi-types/src/variant-types.ts:31](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L31) *** @@ -60,7 +60,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -[variant-types.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L29) +[packages/quickjs-ffi-types/src/variant-types.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/variant-types.ts#L29) *** diff --git a/doc/@jitl/quickjs-ffi-types/interfaces/SourceMapData.md b/doc/@jitl/quickjs-ffi-types/interfaces/SourceMapData.md new file mode 100644 index 00000000..5e00f16e --- /dev/null +++ b/doc/@jitl/quickjs-ffi-types/interfaces/SourceMapData.md @@ -0,0 +1,59 @@ +[quickjs-emscripten](../../../packages.md) • **@jitl/quickjs-ffi-types** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../../packages.md) / [@jitl/quickjs-ffi-types](../exports.md) / SourceMapData + +# Interface: SourceMapData + +## Contents + +- [Properties](SourceMapData.md#properties) + - [mappings](SourceMapData.md#mappings) + - [names](SourceMapData.md#names) + - [sources](SourceMapData.md#sources) + - [version](SourceMapData.md#version) + +## Properties + +### mappings + +> **mappings**: `string` + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:58](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L58) + +*** + +### names + +> **names**: `string`[] + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:57](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L57) + +*** + +### sources + +> **sources**: `string`[] + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:56](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L56) + +*** + +### version + +> **version**: `number` + +#### Source + +[packages/quickjs-ffi-types/src/emscripten-types.ts:55](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-ffi-types/src/emscripten-types.ts#L55) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md index 2a7cb240..22a423a0 100644 --- a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md @@ -82,6 +82,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-s ASYNCIFY_ADVISE=1", "-O3" diff --git a/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md b/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md index a657d6dc..310e38bf 100644 --- a/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md @@ -75,6 +75,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", diff --git a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md index 52b0c6dc..45d41c76 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md @@ -82,6 +82,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-s ASYNCIFY_ADVISE=1", "-O3" diff --git a/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md b/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md index 1ec59b5c..cbe2e726 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-cjs-debug-sync/README.md @@ -75,6 +75,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", diff --git a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md index adf5075b..54e3bc08 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/README.md @@ -82,6 +82,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-s ASYNCIFY_ADVISE=1", "-O3" diff --git a/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md b/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md index 0c07619c..6e944031 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md +++ b/doc/@jitl/quickjs-singlefile-mjs-debug-sync/README.md @@ -75,6 +75,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", diff --git a/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md b/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md index 16bad157..f89c3482 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md @@ -21,7 +21,7 @@ This variant was built with the following settings: - [Library: quickjs](README.md#library-quickjs) - [Release mode: debug](README.md#release-mode-debug) -- [Exports: require import browser](README.md#exports-require-import-browser) +- [Exports: require import browser workerd](README.md#exports-require-import-browser-workerd) - [Extra async magic? Yes](README.md#extra-async-magic-yes) - [Single-file, or separate .wasm file? wasm](README.md#single-file-or-separate-wasm-file-wasm) - [More details](README.md#more-details) @@ -34,13 +34,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? Yes @@ -70,6 +71,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } @@ -90,6 +94,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s ASYNCIFY_ADVISE=1", "-O3" ] diff --git a/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md b/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md index 607bbeef..1af45a7f 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md +++ b/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md @@ -28,7 +28,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source diff --git a/doc/@jitl/quickjs-wasmfile-debug-sync/README.md b/doc/@jitl/quickjs-wasmfile-debug-sync/README.md index 7bcf60fb..3e1a355b 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-sync/README.md +++ b/doc/@jitl/quickjs-wasmfile-debug-sync/README.md @@ -21,7 +21,7 @@ This variant was built with the following settings: - [Library: quickjs](README.md#library-quickjs) - [Release mode: debug](README.md#release-mode-debug) -- [Exports: require import browser](README.md#exports-require-import-browser) +- [Exports: require import browser workerd](README.md#exports-require-import-browser-workerd) - [Extra async magic? No](README.md#extra-async-magic-no) - [Single-file, or separate .wasm file? wasm](README.md#single-file-or-separate-wasm-file-wasm) - [More details](README.md#more-details) @@ -34,13 +34,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? No @@ -70,6 +71,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } @@ -83,6 +87,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md b/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md index c3846234..4edc11bf 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md +++ b/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md @@ -28,7 +28,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | 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 | sync | The default, normal build. Note that both variants support regular async functions. | | 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source diff --git a/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md b/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md index 27a37c32..aa174ddc 100644 --- a/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md +++ b/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md @@ -21,7 +21,7 @@ This variant was built with the following settings: - [Library: quickjs](README.md#library-quickjs) - [Release mode: release](README.md#release-mode-release) -- [Exports: require import browser](README.md#exports-require-import-browser) +- [Exports: require import browser workerd](README.md#exports-require-import-browser-workerd) - [Extra async magic? Yes](README.md#extra-async-magic-yes) - [Single-file, or separate .wasm file? wasm](README.md#single-file-or-separate-wasm-file-wasm) - [More details](README.md#more-details) @@ -34,13 +34,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Optimized for performance; use when building/deploying your application. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? Yes @@ -70,6 +71,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } diff --git a/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md b/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md index 9a35d647..11918546 100644 --- a/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md +++ b/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md @@ -28,7 +28,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | releaseMode | release | Optimized for performance; use when building/deploying your application. | | 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source diff --git a/doc/@jitl/quickjs-wasmfile-release-sync/README.md b/doc/@jitl/quickjs-wasmfile-release-sync/README.md index 242ec48b..1a922155 100644 --- a/doc/@jitl/quickjs-wasmfile-release-sync/README.md +++ b/doc/@jitl/quickjs-wasmfile-release-sync/README.md @@ -21,7 +21,7 @@ This variant was built with the following settings: - [Library: quickjs](README.md#library-quickjs) - [Release mode: release](README.md#release-mode-release) -- [Exports: require import browser](README.md#exports-require-import-browser) +- [Exports: require import browser workerd](README.md#exports-require-import-browser-workerd) - [Extra async magic? No](README.md#extra-async-magic-no) - [Single-file, or separate .wasm file? wasm](README.md#single-file-or-separate-wasm-file-wasm) - [More details](README.md#more-details) @@ -34,13 +34,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Optimized for performance; use when building/deploying your application. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? No @@ -70,6 +71,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } diff --git a/doc/@jitl/quickjs-wasmfile-release-sync/exports.md b/doc/@jitl/quickjs-wasmfile-release-sync/exports.md index e087c49b..7838a375 100644 --- a/doc/@jitl/quickjs-wasmfile-release-sync/exports.md +++ b/doc/@jitl/quickjs-wasmfile-release-sync/exports.md @@ -28,7 +28,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | releaseMode | release | Optimized for performance; use when building/deploying your application. | | syncMode | sync | The default, normal build. Note that both variants support regular async functions. | | 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source diff --git a/doc/README.md b/doc/README.md index 86c6e151..b5898f76 100644 --- a/doc/README.md +++ b/doc/README.md @@ -62,11 +62,13 @@ main() - [Async module loader](#async-module-loader) - [Async on host, sync in QuickJS](#async-on-host-sync-in-quickjs) - [Testing your code](#testing-your-code) - - [Using in the browser without a build step](#using-in-the-browser-without-a-build-step) - - [quickjs-emscripten-core, variants, and advanced packaging](#quickjs-emscripten-core-variants-and-advanced-packaging) + - [Packaging](#packaging) + - [Reducing package size](#reducing-package-size) + - [WebAssembly loading](#webassembly-loading) + - [Using in the browser without a build step](#using-in-the-browser-without-a-build-step) - [Debugging](#debugging) + - [Supported Platforms](#supported-platforms) - [More Documentation](#more-documentation) - - [Requirements](#requirements) - [Background](#background) - [Status \& Roadmap](#status--roadmap) - [Related](#related) @@ -519,7 +521,105 @@ For more testing examples, please explore the typescript source of [quickjs-emsc [debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/exports.md#debug_sync [testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md -### Using in the browser without a build step +### Packaging + +The main `quickjs-emscripten` package includes several build variants of the WebAssembly module: + +- `RELEASE...` build variants should be used in production. They offer better performance and smaller file size compared to `DEBUG...` build variants. + - `RELEASE_SYNC`: This is the default variant used when you don't explicitly provide one. It offers the fastest performance and smallest file size. + - `RELEASE_ASYNC`: The default variant if you need [asyncify][] magic, which comes at a performance cost. See the asyncify docs for details. +- `DEBUG...` build variants can be helpful during development and testing. They include source maps and assertions for catching bugs in your code. We recommend running your tests with _both_ a debug build variant and the release build variant you'll use in production. + - `DEBUG_SYNC`: Instrumented to detect memory leaks, in addition to assertions and source maps. + - `DEBUG_ASYNC`: An [asyncify][] variant with source maps. + +To use a variant, call `newQuickJSWASMModule` or `newQuickJSAsyncWASMModule` with the variant object. These functions return a promise that resolves to a [QuickJSWASMModule](./doc/quickjs-emscripten/classes/QuickJSWASMModule.md), the same as `getQuickJS`. + +```typescript +import { + newQuickJSWASMModule, + newQuickJSAsyncWASMModule, + RELEASE_SYNC, + DEBUG_SYNC, + RELEASE_ASYNC, + DEBUG_ASYNC, +} from "quickjs-emscripten" + +const QuickJSReleaseSync = await newQuickJSWASMModule(RELEASE_SYNC) +const QuickJSDebugSync = await newQuickJSWASMModule(DEBUG_SYNC) +const QuickJSReleaseAsync = await newQuickJSAsyncWASMModule(RELEASE_ASYNC) +const QuickJSDebugAsync = await newQuickJSAsyncWASMModule(DEBUG_ASYNC) + +for (const quickjs of [ + QuickJSReleaseSync, + QuickJSDebugSync, + QuickJSReleaseAsync, + QuickJSDebugAsync, +]) { + const vm = quickjs.newContext() + const result = vm.unwrapResult(vm.evalCode("1 + 1")).consume(vm.getNumber) + console.log(result) + vm.dispose() + quickjs.dispose() +} +``` + +#### Reducing package size + +Including 4 different copies of the WebAssembly module in the main package gives it an install size of [about 9.04mb](https://packagephobia.com/result?p=quickjs-emscripten). If you're building a CLI package or library of your own, or otherwise don't need to include 4 different variants in your `node_modules`, you can switch to the `quickjs-emscripten-core` package, which contains only the Javascript code for this library, and install one (or more) variants a-la-carte as separate packages. + +The most minimal setup would be to install `quickjs-emscripten-core` and `@jitl/quickjs-wasmfile-release-sync` (1.3mb total): + +```bash +yarn add quickjs-emscripten-core @jitl/quickjs-wasmfile-release-sync +du -h node_modules +# 640K node_modules/@jitl/quickjs-wasmfile-release-sync +# 80K node_modules/@jitl/quickjs-ffi-types +# 588K node_modules/quickjs-emscripten-core +# 1.3M node_modules +``` + +Then, you can use quickjs-emscripten-core's `newQuickJSWASMModuleFromVariant` to create a QuickJS module (see [the minimal example][minimal]): + +```typescript +// src/quickjs.mjs +import { newQuickJSWASMModuleFromVariant } from "quickjs-emscripten-core" +import RELEASE_SYNC from "@jitl/quickjs-wasmfile-release-sync" +export const QuickJS = await newQuickJSWASMModuleFromVariant(RELEASE_SYNC) + +// src/app.mjs +import { QuickJS } from "./quickjs.mjs" +console.log(QuickJS.evalCode("1 + 1")) +``` + +See the [documentation of quickjs-emscripten-core][core] for more details and the list of variant packages. + +[core]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten-core/README.md + +#### WebAssembly loading + +To run QuickJS, we need to load a WebAssembly module into the host Javascript runtime's memory (usually as an ArrayBuffer or TypedArray) and [compile it](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/instantiate_static) to a [WebAssembly.Module](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Module). This means we need to find the file path or URI of the WebAssembly module, and then read it using an API like `fetch` (browser) or `fs.readFile` (NodeJS). `quickjs-emscripten` tries to handle this automatically using patterns like `new URL('./local-path', import.meta.url)` that work in the browser or are handled automatically by bundlers, or `__dirname` in NodeJS, but you may need to configure this manually if these don't work in your environment, or you want more control about how the WebAssembly module is loaded. + +To customize the loading of an existing variant, create a new variant with your loading settings using `newVariant`, passing [CustomizeVariantOptions][newVariant]. For example, you need to customize loading in Cloudflare Workers (see [the full example][cloudflare]). + +```typescript +import { newQuickJSWASMModule, DEBUG_SYNC as baseVariant, newVariant } from "quickjs-emscripten" +import cloudflareWasmModule from "./DEBUG_SYNC.wasm" +import cloudflareWasmModuleSourceMap from "./DEBUG_SYNC.wasm.map.txt" + +/** + * We need to make a new variant that directly passes the imported WebAssembly.Module + * to Emscripten. Normally we'd load the wasm file as bytes from a URL, but + * that's forbidden in Cloudflare workers. + */ +const cloudflareVariant = newVariant(baseVariant, { + wasmModule: cloudflareWasmModule, + wasmSourceMapData: cloudflareWasmModuleSourceMap, +}) +``` + +[newVariant]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md + +#### Using in the browser without a build step You can use quickjs-emscripten directly from an HTML file in two ways: @@ -552,16 +652,6 @@ You can use quickjs-emscripten directly from an HTML file in two ways: ``` -### quickjs-emscripten-core, variants, and advanced packaging - -Them main `quickjs-emscripten` package includes several build variants of the WebAssembly module. -If these variants are too large for you, you can instead use the `quickjs-emscripten-core` package, -and manually select your own build variant. - -See the [documentation of quickjs-emscripten-core][core] for more details. - -[core]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten-core/README.md - ### Debugging - Switch to a DEBUG build variant of the WebAssembly module to see debug log messages from the C part of this library: @@ -599,24 +689,35 @@ See the [documentation of quickjs-emscripten-core][core] for more details. [setDebugMode]: doc/quickjs-emscripten/exports.md#setdebugmode -### More Documentation - -[Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] - -### Requirements +### Supported Platforms `quickjs-emscripten` and related packages should work in any environment that supports ES2020. -- NodeJS: requires v16.0.0 or later for WebAssembly compatibility. Tested with node@18. -- We estimate support for the following browsers: +- Browsers: we estimate support for the following browser versions. See the [global-iife][iife] and [esmodule][esm-html] HTML examples. - Chrome 63+ - Edge 79+ - Safari 11.1+ - Firefox 58+ +- NodeJS: requires v16.0.0 or later for WebAssembly compatibility. Tested with node@18. See the [node-typescript][tsx-example] and [node-minimal][minimal] examples. +- Typescript: tested with typescript@4.5.5 and typescript@5.3.3. See the [node-typescript example][tsx-example]. +- Vite: tested with vite@5.0.10. See the [Vite/Vue example][vite]. +- Create react app: tested with react-scripts@5.0.1. See the [create-react-app example][cra]. - Webpack: tested with webpack@5.89.0 via create-react-app. -- Vite: tested with vite@5.0.10. -- Typescript: tested with typescript@4.5.5 and typescript@5.3.3. -- Create react app: tested with react-scripts@5.0.1. +- Cloudflare Workers: tested with wrangler@3.22.1. See the [Cloudflare Workers example][cloudflare]. +- Deno: tested with deno 1.39.1. See the [Deno example][deno]. + +[iife]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/global-iife.html +[esm-html]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/esmodule.html +[deno]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/deno +[vite]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/vite-vue +[cra]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/create-react-app +[cloudflare]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/cloudflare-workers +[tsx-example]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/node-typescript +[minimal]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/node-minimal + +### More Documentation + +[Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] ## Background diff --git a/doc/quickjs-emscripten-core/README.md b/doc/quickjs-emscripten-core/README.md index 20094aff..47c634be 100644 --- a/doc/quickjs-emscripten-core/README.md +++ b/doc/quickjs-emscripten-core/README.md @@ -98,48 +98,48 @@ const QuickJS = await newQuickJSWASMModuleFromVariant(variant) [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-debug-sync/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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 | sync | The default, normal build. Note that both variants support regular async functions. | -| 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | sync | The default, normal build. Note that both variants support regular async functions. | +| 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 | ### @jitl/quickjs-wasmfile-debug-asyncify [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | ### @jitl/quickjs-wasmfile-release-sync [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-sync/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| releaseMode | release | Optimized for performance; use when building/deploying your application. | -| syncMode | sync | The default, normal build. Note that both variants support regular async functions. | -| 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| releaseMode | release | Optimized for performance; use when building/deploying your application. | +| syncMode | sync | The default, normal build. Note that both variants support regular async functions. | +| 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 | ### @jitl/quickjs-wasmfile-release-asyncify [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| releaseMode | release | Optimized for performance; use when building/deploying your application. | -| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| releaseMode | release | Optimized for performance; use when building/deploying your application. | +| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | ### @jitl/quickjs-singlefile-cjs-debug-sync diff --git a/doc/quickjs-emscripten-core/exports.md b/doc/quickjs-emscripten-core/exports.md index ed65b635..16cc7524 100644 --- a/doc/quickjs-emscripten-core/exports.md +++ b/doc/quickjs-emscripten-core/exports.md @@ -36,6 +36,7 @@ - [JSValuePointer](exports.md#jsvaluepointer) - [JSValuePointerPointer](exports.md#jsvaluepointerpointer) - [JSVoidPointer](exports.md#jsvoidpointer) + - [OrLoader\](exports.md#orloadert) - [OwnedHeapCharPointer](exports.md#ownedheapcharpointer) - [PromiseExecutor\](exports.md#promiseexecutorresolvet-rejectt) - [PromisedDefault\](exports.md#promiseddefaultt) @@ -58,6 +59,7 @@ - [memoizePromiseFactory()](exports.md#memoizepromisefactory) - [newQuickJSAsyncWASMModuleFromVariant()](exports.md#newquickjsasyncwasmmodulefromvariant) - [newQuickJSWASMModuleFromVariant()](exports.md#newquickjswasmmodulefromvariant) + - [newVariant()](exports.md#newvariant) - [shouldInterruptAfterDeadline()](exports.md#shouldinterruptafterdeadline) ## Namespaces @@ -84,9 +86,11 @@ - [AsyncRuntimeOptions](interfaces/AsyncRuntimeOptions.md) - [ContextEvalOptions](interfaces/ContextEvalOptions.md) - [ContextOptions](interfaces/ContextOptions.md) +- [CustomizeVariantOptions](interfaces/CustomizeVariantOptions.md) - [Disposable](interfaces/Disposable.md) - [EmscriptenModule](interfaces/EmscriptenModule.md) - [EmscriptenModuleLoader](interfaces/EmscriptenModuleLoader.md) +- [EmscriptenModuleLoaderOptions](interfaces/EmscriptenModuleLoaderOptions.md) - [JSModuleLoader](interfaces/JSModuleLoader.md) - [JSModuleLoaderAsync](interfaces/JSModuleLoaderAsync.md) - [JSModuleNormalizer](interfaces/JSModuleNormalizer.md) @@ -101,6 +105,7 @@ - [QuickJSSyncVariant](interfaces/QuickJSSyncVariant.md) - [RuntimeOptions](interfaces/RuntimeOptions.md) - [RuntimeOptionsBase](interfaces/RuntimeOptionsBase.md) +- [SourceMapData](interfaces/SourceMapData.md) - [VmPropertyDescriptor](interfaces/VmPropertyDescriptor.md) ## Type Aliases @@ -144,7 +149,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:66 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:392 +packages/quickjs-ffi-types/dist/index.d.ts:455 *** @@ -154,7 +159,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:392 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:206 +packages/quickjs-ffi-types/dist/index.d.ts:269 *** @@ -425,6 +430,20 @@ packages/quickjs-ffi-types/dist/index.d.ts:80 *** +### OrLoader\ + +> **OrLoader**\<`T`\>: `T` \| () => `Promise`\<`T`\> + +#### Type parameters + +• **T** + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:117](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L117) + +*** + ### OwnedHeapCharPointer > **OwnedHeapCharPointer**: `Pointer`\<`"char"`\> @@ -474,7 +493,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:71 #### Source -[packages/quickjs-emscripten-core/src/from-variant.ts:8](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L8) +[packages/quickjs-emscripten-core/src/from-variant.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L17) *** @@ -549,7 +568,7 @@ Property key for getting or setting a property on a handle with #### Source -packages/quickjs-ffi-types/dist/index.d.ts:391 +packages/quickjs-ffi-types/dist/index.d.ts:454 *** @@ -814,7 +833,7 @@ const getDebugModule = memoizePromiseFactory(() => newQuickJSWASMModule(DEBUG_SY #### Source -[packages/quickjs-emscripten-core/src/from-variant.ts:91](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L91) +[packages/quickjs-emscripten-core/src/from-variant.ts:100](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L100) *** @@ -854,7 +873,7 @@ const quickjs = new newQuickJSAsyncWASMModuleFromVariant( #### Source -[packages/quickjs-emscripten-core/src/from-variant.ts:67](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L67) +[packages/quickjs-emscripten-core/src/from-variant.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L76) *** @@ -889,7 +908,34 @@ const quickjs = new newQuickJSWASMModuleFromVariant( #### Source -[packages/quickjs-emscripten-core/src/from-variant.ts:29](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L29) +[packages/quickjs-emscripten-core/src/from-variant.ts:38](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L38) + +*** + +### newVariant() + +> **newVariant**\<`T`\>(`baseVariant`, `options`): `T` + +Create a new variant by overriding how Emscripten obtains the WebAssembly module. +This may be necessary in Cloudflare Workers, which can't compile WebAssembly modules from binary data. + +#### Type parameters + +• **T** extends [`QuickJSVariant`](exports.md#quickjsvariant) + +#### Parameters + +• **baseVariant**: `T` + +• **options**: [`CustomizeVariantOptions`](interfaces/CustomizeVariantOptions.md) + +#### Returns + +`T` + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:160](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L160) *** diff --git a/doc/quickjs-emscripten-core/interfaces/CustomizeVariantOptions.md b/doc/quickjs-emscripten-core/interfaces/CustomizeVariantOptions.md new file mode 100644 index 00000000..2584fa76 --- /dev/null +++ b/doc/quickjs-emscripten-core/interfaces/CustomizeVariantOptions.md @@ -0,0 +1,167 @@ +[quickjs-emscripten](../../packages.md) • **quickjs-emscripten-core** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../packages.md) / [quickjs-emscripten-core](../exports.md) / CustomizeVariantOptions + +# Interface: CustomizeVariantOptions + +## Contents + +- [Properties](CustomizeVariantOptions.md#properties) + - [emscriptenModule?](CustomizeVariantOptions.md#emscriptenmodule) + - [locateFile?](CustomizeVariantOptions.md#locatefile) + - [log?](CustomizeVariantOptions.md#log) + - [wasmBinary?](CustomizeVariantOptions.md#wasmbinary) + - [wasmLocation?](CustomizeVariantOptions.md#wasmlocation) + - [wasmModule?](CustomizeVariantOptions.md#wasmmodule) + - [wasmSourceMapData?](CustomizeVariantOptions.md#wasmsourcemapdata) + - [wasmSourceMapLocation?](CustomizeVariantOptions.md#wasmsourcemaplocation) + +## Properties + +### emscriptenModule? + +> **emscriptenModule**?: [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) + +The enumerable properties of this object will be passed verbatim, although they may be overwritten if you pass other options. + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:151](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L151) + +*** + +### locateFile? + +> **locateFile**?: (`fileName`, `prefix`) => `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:149](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L149) + +*** + +### log? + +> **log**?: (...`data`) => `void`(`message`?, ...`optionalParams`) => `void` + +Debug logger + +#### Parameters + +• ...**data**: `any`[] + +#### Returns + +`void` + +Debug logger + +#### Parameters + +• **message?**: `any` + +• ...**optionalParams?**: `any`[] + +#### Returns + +`void` + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:153](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L153) + +*** + +### wasmBinary? + +> **wasmBinary**?: [`OrLoader`](../exports.md#orloadert)\<`ArrayBuffer`\> + +If given, Emscripten will compile the WebAssembly.Module from these bytes. + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:123](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L123) + +*** + +### wasmLocation? + +> **wasmLocation**?: `string` + +If given, Emscripten will try to load the WebAssembly module data from this location (path or URI) as appropriate for the current platform. + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:121](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L121) + +*** + +### wasmModule? + +> **wasmModule**?: [`OrLoader`](../exports.md#orloadert)\<`Module`\> + +If given, Emscripten will instantiate the WebAssembly.Instance from this existing WebAssembly.Module + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:125](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L125) + +*** + +### wasmSourceMapData? + +> **wasmSourceMapData**?: [`OrLoader`](../exports.md#orloadert)\<`string` \| [`SourceMapData`](SourceMapData.md)\> + +If given, we will provide the source map to Emscripten directly. This may only be respected if wasmModule is also provided. + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:129](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L129) + +*** + +### wasmSourceMapLocation? + +> **wasmSourceMapLocation**?: `string` + +If given, Emscripten will try to load the source map for the WebAssembly module from this location (path or URI) as appropriate for the current platform. + +#### Source + +[packages/quickjs-emscripten-core/src/from-variant.ts:127](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/from-variant.ts#L127) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md b/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md index c76f2878..6f7c73b6 100644 --- a/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md +++ b/doc/quickjs-emscripten-core/interfaces/EmscriptenModule.md @@ -11,7 +11,7 @@ QuickJS. ## Contents -- [Extended By](EmscriptenModule.md#extended-by) +- [Extends](EmscriptenModule.md#extends) - [Properties](EmscriptenModule.md#properties) - [FAST\_MEMORY](EmscriptenModule.md#fast-memory) - [HEAP16](EmscriptenModule.md#heap16) @@ -24,18 +24,21 @@ QuickJS. - [HEAPU8](EmscriptenModule.md#heapu8) - [TOTAL\_MEMORY](EmscriptenModule.md#total-memory) - [TOTAL\_STACK](EmscriptenModule.md#total-stack) + - [wasmBinary?](EmscriptenModule.md#wasmbinary) - [Methods](EmscriptenModule.md#methods) - [UTF8ToString()](EmscriptenModule.md#utf8tostring) - [\_free()](EmscriptenModule.md#free) - [\_malloc()](EmscriptenModule.md#malloc) - [cwrap()](EmscriptenModule.md#cwrap) + - [instantiateWasm()?](EmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](EmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](EmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](EmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](EmscriptenModule.md#stringtoutf8) -## Extended By +## Extends -- [`QuickJSAsyncEmscriptenModule`](QuickJSAsyncEmscriptenModule.md) -- [`QuickJSEmscriptenModule`](QuickJSEmscriptenModule.md) +- [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) ## Properties @@ -45,7 +48,7 @@ QuickJS. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:163 +packages/quickjs-ffi-types/dist/index.d.ts:226 *** @@ -55,7 +58,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:163 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:154 +packages/quickjs-ffi-types/dist/index.d.ts:217 *** @@ -65,7 +68,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:154 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:155 +packages/quickjs-ffi-types/dist/index.d.ts:218 *** @@ -75,7 +78,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:155 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:153 +packages/quickjs-ffi-types/dist/index.d.ts:216 *** @@ -85,7 +88,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:153 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:159 +packages/quickjs-ffi-types/dist/index.d.ts:222 *** @@ -95,7 +98,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:159 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:160 +packages/quickjs-ffi-types/dist/index.d.ts:223 *** @@ -105,7 +108,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:160 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:157 +packages/quickjs-ffi-types/dist/index.d.ts:220 *** @@ -115,7 +118,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:157 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:158 +packages/quickjs-ffi-types/dist/index.d.ts:221 *** @@ -125,7 +128,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:158 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:156 +packages/quickjs-ffi-types/dist/index.d.ts:219 *** @@ -135,7 +138,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:156 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:162 +packages/quickjs-ffi-types/dist/index.d.ts:225 *** @@ -145,7 +148,23 @@ packages/quickjs-ffi-types/dist/index.d.ts:162 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:161 +packages/quickjs-ffi-types/dist/index.d.ts:224 + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModuleLoaderOptions.wasmBinary`](EmscriptenModuleLoaderOptions.md#wasmbinary) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 ## Methods @@ -168,7 +187,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -packages/quickjs-ffi-types/dist/index.d.ts:148 +packages/quickjs-ffi-types/dist/index.d.ts:211 *** @@ -186,7 +205,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:148 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:151 +packages/quickjs-ffi-types/dist/index.d.ts:214 *** @@ -204,7 +223,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:151 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:150 +packages/quickjs-ffi-types/dist/index.d.ts:213 *** @@ -237,7 +256,33 @@ packages/quickjs-ffi-types/dist/index.d.ts:150 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:152 +packages/quickjs-ffi-types/dist/index.d.ts:215 + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModuleLoaderOptions.instantiateWasm`](EmscriptenModuleLoaderOptions.md#instantiatewasm) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 *** @@ -255,7 +300,75 @@ packages/quickjs-ffi-types/dist/index.d.ts:152 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:149 +packages/quickjs-ffi-types/dist/index.d.ts:212 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModuleLoaderOptions.locateFile`](EmscriptenModuleLoaderOptions.md#locatefile) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModuleLoaderOptions.monitorRunDependencies`](EmscriptenModuleLoaderOptions.md#monitorrundependencies) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 *** @@ -280,7 +393,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:143 +packages/quickjs-ffi-types/dist/index.d.ts:206 *** diff --git a/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md b/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md index 56550308..15f066fe 100644 --- a/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md +++ b/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoader.md @@ -10,7 +10,11 @@ • **T** extends [`EmscriptenModule`](EmscriptenModule.md) -> **EmscriptenModuleLoader**(): `Promise`\<`T`\> +> **EmscriptenModuleLoader**(`options`?): `Promise`\<`T`\> + +## Parameters + +• **options?**: [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) ## Returns @@ -18,7 +22,7 @@ ## Source -packages/quickjs-ffi-types/dist/index.d.ts:208 +packages/quickjs-ffi-types/dist/index.d.ts:271 *** diff --git a/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoaderOptions.md b/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoaderOptions.md new file mode 100644 index 00000000..322e42da --- /dev/null +++ b/doc/quickjs-emscripten-core/interfaces/EmscriptenModuleLoaderOptions.md @@ -0,0 +1,123 @@ +[quickjs-emscripten](../../packages.md) • **quickjs-emscripten-core** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../packages.md) / [quickjs-emscripten-core](../exports.md) / EmscriptenModuleLoaderOptions + +# Interface: EmscriptenModuleLoaderOptions + +This structure is defined by Emscripten. +It's possible to provide these parameters to an emscripten module loader. +See [the Emscripten Module API reference](https://emscripten.org/docs/api_reference/module.html). + +## Contents + +- [Extended By](EmscriptenModuleLoaderOptions.md#extended-by) +- [Properties](EmscriptenModuleLoaderOptions.md#properties) + - [wasmBinary?](EmscriptenModuleLoaderOptions.md#wasmbinary) +- [Methods](EmscriptenModuleLoaderOptions.md#methods) + - [instantiateWasm()?](EmscriptenModuleLoaderOptions.md#instantiatewasm) + - [locateFile()?](EmscriptenModuleLoaderOptions.md#locatefile) + - [monitorRunDependencies()?](EmscriptenModuleLoaderOptions.md#monitorrundependencies) + +## Extended By + +- [`EmscriptenModule`](EmscriptenModule.md) + +## Properties + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 + +## Methods + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md index 04056193..126c310a 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncEmscriptenModule.md @@ -26,12 +26,16 @@ QuickJS. - [TOTAL\_STACK](QuickJSAsyncEmscriptenModule.md#total-stack) - [callbacks](QuickJSAsyncEmscriptenModule.md#callbacks) - [type](QuickJSAsyncEmscriptenModule.md#type) + - [wasmBinary?](QuickJSAsyncEmscriptenModule.md#wasmbinary) - [Methods](QuickJSAsyncEmscriptenModule.md#methods) - [UTF8ToString()](QuickJSAsyncEmscriptenModule.md#utf8tostring) - [\_free()](QuickJSAsyncEmscriptenModule.md#free) - [\_malloc()](QuickJSAsyncEmscriptenModule.md#malloc) - [cwrap()](QuickJSAsyncEmscriptenModule.md#cwrap) + - [instantiateWasm()?](QuickJSAsyncEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSAsyncEmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](QuickJSAsyncEmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](QuickJSAsyncEmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](QuickJSAsyncEmscriptenModule.md#stringtoutf8) ## Extends @@ -50,7 +54,7 @@ QuickJS. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:163 +packages/quickjs-ffi-types/dist/index.d.ts:226 *** @@ -64,7 +68,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:163 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:154 +packages/quickjs-ffi-types/dist/index.d.ts:217 *** @@ -78,7 +82,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:154 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:155 +packages/quickjs-ffi-types/dist/index.d.ts:218 *** @@ -92,7 +96,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:155 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:153 +packages/quickjs-ffi-types/dist/index.d.ts:216 *** @@ -106,7 +110,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:153 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:159 +packages/quickjs-ffi-types/dist/index.d.ts:222 *** @@ -120,7 +124,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:159 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:160 +packages/quickjs-ffi-types/dist/index.d.ts:223 *** @@ -134,7 +138,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:160 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:157 +packages/quickjs-ffi-types/dist/index.d.ts:220 *** @@ -148,7 +152,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:157 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:158 +packages/quickjs-ffi-types/dist/index.d.ts:221 *** @@ -162,7 +166,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:158 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:156 +packages/quickjs-ffi-types/dist/index.d.ts:219 *** @@ -176,7 +180,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:156 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:162 +packages/quickjs-ffi-types/dist/index.d.ts:225 *** @@ -190,7 +194,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:162 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:161 +packages/quickjs-ffi-types/dist/index.d.ts:224 *** @@ -200,7 +204,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:161 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:204 +packages/quickjs-ffi-types/dist/index.d.ts:267 *** @@ -214,7 +218,23 @@ Implement this field #### Source -packages/quickjs-ffi-types/dist/index.d.ts:203 +packages/quickjs-ffi-types/dist/index.d.ts:266 + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.wasmBinary`](EmscriptenModule.md#wasmbinary) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 ## Methods @@ -241,7 +261,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -packages/quickjs-ffi-types/dist/index.d.ts:148 +packages/quickjs-ffi-types/dist/index.d.ts:211 *** @@ -263,7 +283,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:148 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:151 +packages/quickjs-ffi-types/dist/index.d.ts:214 *** @@ -285,7 +305,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:151 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:150 +packages/quickjs-ffi-types/dist/index.d.ts:213 *** @@ -322,7 +342,33 @@ packages/quickjs-ffi-types/dist/index.d.ts:150 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:152 +packages/quickjs-ffi-types/dist/index.d.ts:215 + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.instantiateWasm`](EmscriptenModule.md#instantiatewasm) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 *** @@ -344,7 +390,75 @@ packages/quickjs-ffi-types/dist/index.d.ts:152 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:149 +packages/quickjs-ffi-types/dist/index.d.ts:212 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.locateFile`](EmscriptenModule.md#locatefile) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.monitorRunDependencies`](EmscriptenModule.md#monitorrundependencies) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 *** @@ -373,7 +487,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:143 +packages/quickjs-ffi-types/dist/index.d.ts:206 *** diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md index 48fa3a9f..45d2d2eb 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncFFI.md @@ -94,7 +94,7 @@ Set at compile time. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:289 +packages/quickjs-ffi-types/dist/index.d.ts:352 *** @@ -114,7 +114,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:289 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:347 +packages/quickjs-ffi-types/dist/index.d.ts:410 *** @@ -128,7 +128,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:347 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:345 +packages/quickjs-ffi-types/dist/index.d.ts:408 *** @@ -142,7 +142,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:345 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:344 +packages/quickjs-ffi-types/dist/index.d.ts:407 *** @@ -156,7 +156,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:344 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:296 +packages/quickjs-ffi-types/dist/index.d.ts:359 *** @@ -182,7 +182,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:296 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:333 +packages/quickjs-ffi-types/dist/index.d.ts:396 *** @@ -208,7 +208,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:333 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:334 +packages/quickjs-ffi-types/dist/index.d.ts:397 *** @@ -242,7 +242,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:334 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:332 +packages/quickjs-ffi-types/dist/index.d.ts:395 *** @@ -262,7 +262,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:332 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:336 +packages/quickjs-ffi-types/dist/index.d.ts:399 *** @@ -282,7 +282,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:336 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:337 +packages/quickjs-ffi-types/dist/index.d.ts:400 *** @@ -302,7 +302,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:337 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:310 +packages/quickjs-ffi-types/dist/index.d.ts:373 *** @@ -328,7 +328,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:310 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:338 +packages/quickjs-ffi-types/dist/index.d.ts:401 *** @@ -354,7 +354,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:338 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:339 +packages/quickjs-ffi-types/dist/index.d.ts:402 *** @@ -376,7 +376,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:339 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:326 +packages/quickjs-ffi-types/dist/index.d.ts:389 *** @@ -398,7 +398,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:326 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:327 +packages/quickjs-ffi-types/dist/index.d.ts:390 *** @@ -418,7 +418,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:327 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:309 +packages/quickjs-ffi-types/dist/index.d.ts:372 *** @@ -436,7 +436,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:309 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:305 +packages/quickjs-ffi-types/dist/index.d.ts:368 *** @@ -454,7 +454,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:305 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:303 +packages/quickjs-ffi-types/dist/index.d.ts:366 *** @@ -474,7 +474,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:303 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:306 +packages/quickjs-ffi-types/dist/index.d.ts:369 *** @@ -494,7 +494,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:306 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:307 +packages/quickjs-ffi-types/dist/index.d.ts:370 *** @@ -514,7 +514,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:307 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:308 +packages/quickjs-ffi-types/dist/index.d.ts:371 *** @@ -534,7 +534,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:308 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:319 +packages/quickjs-ffi-types/dist/index.d.ts:382 *** @@ -554,7 +554,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:319 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:320 +packages/quickjs-ffi-types/dist/index.d.ts:383 *** @@ -568,7 +568,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:320 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:300 +packages/quickjs-ffi-types/dist/index.d.ts:363 *** @@ -588,7 +588,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:300 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:316 +packages/quickjs-ffi-types/dist/index.d.ts:379 *** @@ -606,7 +606,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:316 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:341 +packages/quickjs-ffi-types/dist/index.d.ts:404 *** @@ -620,7 +620,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:341 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:299 +packages/quickjs-ffi-types/dist/index.d.ts:362 *** @@ -642,7 +642,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:299 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:328 +packages/quickjs-ffi-types/dist/index.d.ts:391 *** @@ -664,7 +664,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:328 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:329 +packages/quickjs-ffi-types/dist/index.d.ts:392 *** @@ -684,7 +684,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:329 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:318 +packages/quickjs-ffi-types/dist/index.d.ts:381 *** @@ -704,7 +704,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:318 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:322 +packages/quickjs-ffi-types/dist/index.d.ts:385 *** @@ -724,7 +724,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:322 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:323 +packages/quickjs-ffi-types/dist/index.d.ts:386 *** @@ -738,7 +738,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:323 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:301 +packages/quickjs-ffi-types/dist/index.d.ts:364 *** @@ -752,7 +752,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:301 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:298 +packages/quickjs-ffi-types/dist/index.d.ts:361 *** @@ -772,7 +772,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:298 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:324 +packages/quickjs-ffi-types/dist/index.d.ts:387 *** @@ -790,7 +790,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:324 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:325 +packages/quickjs-ffi-types/dist/index.d.ts:388 *** @@ -808,7 +808,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:325 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:313 +packages/quickjs-ffi-types/dist/index.d.ts:376 *** @@ -830,7 +830,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:313 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:314 +packages/quickjs-ffi-types/dist/index.d.ts:377 *** @@ -848,7 +848,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:314 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:304 +packages/quickjs-ffi-types/dist/index.d.ts:367 *** @@ -866,7 +866,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:304 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:291 +packages/quickjs-ffi-types/dist/index.d.ts:354 *** @@ -886,7 +886,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:291 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:315 +packages/quickjs-ffi-types/dist/index.d.ts:378 *** @@ -908,7 +908,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:315 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:346 +packages/quickjs-ffi-types/dist/index.d.ts:409 *** @@ -926,7 +926,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:346 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:311 +packages/quickjs-ffi-types/dist/index.d.ts:374 *** @@ -946,7 +946,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:311 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:312 +packages/quickjs-ffi-types/dist/index.d.ts:375 *** @@ -966,7 +966,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:312 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:342 +packages/quickjs-ffi-types/dist/index.d.ts:405 *** @@ -980,7 +980,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:342 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:302 +packages/quickjs-ffi-types/dist/index.d.ts:365 *** @@ -1000,7 +1000,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:302 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:317 +packages/quickjs-ffi-types/dist/index.d.ts:380 *** @@ -1022,7 +1022,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:317 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:321 +packages/quickjs-ffi-types/dist/index.d.ts:384 *** @@ -1036,7 +1036,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:321 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:295 +packages/quickjs-ffi-types/dist/index.d.ts:358 *** @@ -1056,7 +1056,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:295 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:335 +packages/quickjs-ffi-types/dist/index.d.ts:398 *** @@ -1076,7 +1076,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:335 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:293 +packages/quickjs-ffi-types/dist/index.d.ts:356 *** @@ -1094,7 +1094,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:293 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:349 +packages/quickjs-ffi-types/dist/index.d.ts:412 *** @@ -1112,7 +1112,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:349 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:351 +packages/quickjs-ffi-types/dist/index.d.ts:414 *** @@ -1130,7 +1130,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:351 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:294 +packages/quickjs-ffi-types/dist/index.d.ts:357 *** @@ -1148,7 +1148,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:294 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:348 +packages/quickjs-ffi-types/dist/index.d.ts:411 *** @@ -1168,7 +1168,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:348 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:350 +packages/quickjs-ffi-types/dist/index.d.ts:413 *** @@ -1188,7 +1188,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:350 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:297 +packages/quickjs-ffi-types/dist/index.d.ts:360 *** @@ -1208,7 +1208,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:297 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:292 +packages/quickjs-ffi-types/dist/index.d.ts:355 *** @@ -1232,7 +1232,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:292 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:330 +packages/quickjs-ffi-types/dist/index.d.ts:393 *** @@ -1256,7 +1256,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:330 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:331 +packages/quickjs-ffi-types/dist/index.d.ts:394 *** @@ -1274,7 +1274,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:331 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:343 +packages/quickjs-ffi-types/dist/index.d.ts:406 *** @@ -1294,7 +1294,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:343 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:290 +packages/quickjs-ffi-types/dist/index.d.ts:353 *** @@ -1314,7 +1314,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:290 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:340 +packages/quickjs-ffi-types/dist/index.d.ts:403 *** @@ -1334,7 +1334,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:340 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:353 +packages/quickjs-ffi-types/dist/index.d.ts:416 *** @@ -1354,7 +1354,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:353 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:352 +packages/quickjs-ffi-types/dist/index.d.ts:415 *** diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncVariant.md b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncVariant.md index 721dda56..669be6d9 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncVariant.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSAsyncVariant.md @@ -36,7 +36,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:388 +packages/quickjs-ffi-types/dist/index.d.ts:451 *** @@ -50,7 +50,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:388 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:389 +packages/quickjs-ffi-types/dist/index.d.ts:452 *** @@ -60,7 +60,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:389 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:387 +packages/quickjs-ffi-types/dist/index.d.ts:450 *** diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md b/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md index 95a153b3..e5ab2885 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSEmscriptenModule.md @@ -26,12 +26,16 @@ QuickJS. - [TOTAL\_STACK](QuickJSEmscriptenModule.md#total-stack) - [callbacks](QuickJSEmscriptenModule.md#callbacks) - [type](QuickJSEmscriptenModule.md#type) + - [wasmBinary?](QuickJSEmscriptenModule.md#wasmbinary) - [Methods](QuickJSEmscriptenModule.md#methods) - [UTF8ToString()](QuickJSEmscriptenModule.md#utf8tostring) - [\_free()](QuickJSEmscriptenModule.md#free) - [\_malloc()](QuickJSEmscriptenModule.md#malloc) - [cwrap()](QuickJSEmscriptenModule.md#cwrap) + - [instantiateWasm()?](QuickJSEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSEmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](QuickJSEmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](QuickJSEmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](QuickJSEmscriptenModule.md#stringtoutf8) ## Extends @@ -50,7 +54,7 @@ QuickJS. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:163 +packages/quickjs-ffi-types/dist/index.d.ts:226 *** @@ -64,7 +68,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:163 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:154 +packages/quickjs-ffi-types/dist/index.d.ts:217 *** @@ -78,7 +82,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:154 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:155 +packages/quickjs-ffi-types/dist/index.d.ts:218 *** @@ -92,7 +96,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:155 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:153 +packages/quickjs-ffi-types/dist/index.d.ts:216 *** @@ -106,7 +110,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:153 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:159 +packages/quickjs-ffi-types/dist/index.d.ts:222 *** @@ -120,7 +124,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:159 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:160 +packages/quickjs-ffi-types/dist/index.d.ts:223 *** @@ -134,7 +138,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:160 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:157 +packages/quickjs-ffi-types/dist/index.d.ts:220 *** @@ -148,7 +152,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:157 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:158 +packages/quickjs-ffi-types/dist/index.d.ts:221 *** @@ -162,7 +166,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:158 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:156 +packages/quickjs-ffi-types/dist/index.d.ts:219 *** @@ -176,7 +180,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:156 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:162 +packages/quickjs-ffi-types/dist/index.d.ts:225 *** @@ -190,7 +194,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:162 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:161 +packages/quickjs-ffi-types/dist/index.d.ts:224 *** @@ -200,7 +204,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:161 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:199 +packages/quickjs-ffi-types/dist/index.d.ts:262 *** @@ -210,7 +214,23 @@ packages/quickjs-ffi-types/dist/index.d.ts:199 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:198 +packages/quickjs-ffi-types/dist/index.d.ts:261 + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.wasmBinary`](EmscriptenModule.md#wasmbinary) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 ## Methods @@ -237,7 +257,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -packages/quickjs-ffi-types/dist/index.d.ts:148 +packages/quickjs-ffi-types/dist/index.d.ts:211 *** @@ -259,7 +279,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:148 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:151 +packages/quickjs-ffi-types/dist/index.d.ts:214 *** @@ -281,7 +301,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:151 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:150 +packages/quickjs-ffi-types/dist/index.d.ts:213 *** @@ -318,7 +338,33 @@ packages/quickjs-ffi-types/dist/index.d.ts:150 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:152 +packages/quickjs-ffi-types/dist/index.d.ts:215 + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.instantiateWasm`](EmscriptenModule.md#instantiatewasm) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 *** @@ -340,7 +386,75 @@ packages/quickjs-ffi-types/dist/index.d.ts:152 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:149 +packages/quickjs-ffi-types/dist/index.d.ts:212 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.locateFile`](EmscriptenModule.md#locatefile) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`quickjs-emscripten-core.EmscriptenModule.monitorRunDependencies`](EmscriptenModule.md#monitorrundependencies) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 *** @@ -369,7 +483,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:143 +packages/quickjs-ffi-types/dist/index.d.ts:206 *** diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md b/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md index 1915ee33..fa0e6d56 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSFFI.md @@ -87,7 +87,7 @@ Set at compile time. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:220 +packages/quickjs-ffi-types/dist/index.d.ts:283 *** @@ -107,7 +107,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:220 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:271 +packages/quickjs-ffi-types/dist/index.d.ts:334 *** @@ -121,7 +121,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:271 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:269 +packages/quickjs-ffi-types/dist/index.d.ts:332 *** @@ -135,7 +135,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:269 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:268 +packages/quickjs-ffi-types/dist/index.d.ts:331 *** @@ -149,7 +149,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:268 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:227 +packages/quickjs-ffi-types/dist/index.d.ts:290 *** @@ -175,7 +175,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:227 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:260 +packages/quickjs-ffi-types/dist/index.d.ts:323 *** @@ -209,7 +209,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:260 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:259 +packages/quickjs-ffi-types/dist/index.d.ts:322 *** @@ -229,7 +229,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:259 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:262 +packages/quickjs-ffi-types/dist/index.d.ts:325 *** @@ -249,7 +249,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:262 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:241 +packages/quickjs-ffi-types/dist/index.d.ts:304 *** @@ -275,7 +275,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:241 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:263 +packages/quickjs-ffi-types/dist/index.d.ts:326 *** @@ -297,7 +297,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:263 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:256 +packages/quickjs-ffi-types/dist/index.d.ts:319 *** @@ -317,7 +317,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:256 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:240 +packages/quickjs-ffi-types/dist/index.d.ts:303 *** @@ -335,7 +335,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:240 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:236 +packages/quickjs-ffi-types/dist/index.d.ts:299 *** @@ -353,7 +353,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:236 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:234 +packages/quickjs-ffi-types/dist/index.d.ts:297 *** @@ -373,7 +373,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:234 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:237 +packages/quickjs-ffi-types/dist/index.d.ts:300 *** @@ -393,7 +393,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:237 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:238 +packages/quickjs-ffi-types/dist/index.d.ts:301 *** @@ -413,7 +413,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:238 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:239 +packages/quickjs-ffi-types/dist/index.d.ts:302 *** @@ -433,7 +433,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:239 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:250 +packages/quickjs-ffi-types/dist/index.d.ts:313 *** @@ -453,7 +453,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:250 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:251 +packages/quickjs-ffi-types/dist/index.d.ts:314 *** @@ -467,7 +467,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:251 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:231 +packages/quickjs-ffi-types/dist/index.d.ts:294 *** @@ -487,7 +487,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:231 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:247 +packages/quickjs-ffi-types/dist/index.d.ts:310 *** @@ -505,7 +505,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:247 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:265 +packages/quickjs-ffi-types/dist/index.d.ts:328 *** @@ -519,7 +519,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:265 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:230 +packages/quickjs-ffi-types/dist/index.d.ts:293 *** @@ -541,7 +541,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:230 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:257 +packages/quickjs-ffi-types/dist/index.d.ts:320 *** @@ -561,7 +561,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:257 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:249 +packages/quickjs-ffi-types/dist/index.d.ts:312 *** @@ -581,7 +581,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:249 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:253 +packages/quickjs-ffi-types/dist/index.d.ts:316 *** @@ -595,7 +595,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:253 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:232 +packages/quickjs-ffi-types/dist/index.d.ts:295 *** @@ -609,7 +609,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:232 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:229 +packages/quickjs-ffi-types/dist/index.d.ts:292 *** @@ -629,7 +629,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:229 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:254 +packages/quickjs-ffi-types/dist/index.d.ts:317 *** @@ -647,7 +647,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:254 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:255 +packages/quickjs-ffi-types/dist/index.d.ts:318 *** @@ -665,7 +665,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:255 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:244 +packages/quickjs-ffi-types/dist/index.d.ts:307 *** @@ -687,7 +687,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:244 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:245 +packages/quickjs-ffi-types/dist/index.d.ts:308 *** @@ -705,7 +705,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:245 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:235 +packages/quickjs-ffi-types/dist/index.d.ts:298 *** @@ -723,7 +723,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:235 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:222 +packages/quickjs-ffi-types/dist/index.d.ts:285 *** @@ -743,7 +743,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:222 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:246 +packages/quickjs-ffi-types/dist/index.d.ts:309 *** @@ -765,7 +765,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:246 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:270 +packages/quickjs-ffi-types/dist/index.d.ts:333 *** @@ -783,7 +783,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:270 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:242 +packages/quickjs-ffi-types/dist/index.d.ts:305 *** @@ -803,7 +803,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:242 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:243 +packages/quickjs-ffi-types/dist/index.d.ts:306 *** @@ -823,7 +823,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:243 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:266 +packages/quickjs-ffi-types/dist/index.d.ts:329 *** @@ -837,7 +837,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:266 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:233 +packages/quickjs-ffi-types/dist/index.d.ts:296 *** @@ -857,7 +857,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:233 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:248 +packages/quickjs-ffi-types/dist/index.d.ts:311 *** @@ -879,7 +879,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:248 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:252 +packages/quickjs-ffi-types/dist/index.d.ts:315 *** @@ -893,7 +893,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:252 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:226 +packages/quickjs-ffi-types/dist/index.d.ts:289 *** @@ -913,7 +913,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:226 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:261 +packages/quickjs-ffi-types/dist/index.d.ts:324 *** @@ -933,7 +933,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:261 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:224 +packages/quickjs-ffi-types/dist/index.d.ts:287 *** @@ -951,7 +951,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:224 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:273 +packages/quickjs-ffi-types/dist/index.d.ts:336 *** @@ -969,7 +969,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:273 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:275 +packages/quickjs-ffi-types/dist/index.d.ts:338 *** @@ -987,7 +987,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:275 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:225 +packages/quickjs-ffi-types/dist/index.d.ts:288 *** @@ -1005,7 +1005,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:225 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:272 +packages/quickjs-ffi-types/dist/index.d.ts:335 *** @@ -1025,7 +1025,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:272 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:274 +packages/quickjs-ffi-types/dist/index.d.ts:337 *** @@ -1045,7 +1045,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:274 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:228 +packages/quickjs-ffi-types/dist/index.d.ts:291 *** @@ -1065,7 +1065,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:228 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:223 +packages/quickjs-ffi-types/dist/index.d.ts:286 *** @@ -1089,7 +1089,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:223 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:258 +packages/quickjs-ffi-types/dist/index.d.ts:321 *** @@ -1107,7 +1107,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:258 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:267 +packages/quickjs-ffi-types/dist/index.d.ts:330 *** @@ -1127,7 +1127,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:267 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:221 +packages/quickjs-ffi-types/dist/index.d.ts:284 *** @@ -1147,7 +1147,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:221 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:264 +packages/quickjs-ffi-types/dist/index.d.ts:327 *** @@ -1167,7 +1167,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:264 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:277 +packages/quickjs-ffi-types/dist/index.d.ts:340 *** @@ -1187,7 +1187,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:277 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:276 +packages/quickjs-ffi-types/dist/index.d.ts:339 *** diff --git a/doc/quickjs-emscripten-core/interfaces/QuickJSSyncVariant.md b/doc/quickjs-emscripten-core/interfaces/QuickJSSyncVariant.md index b0aa71a9..7918a841 100644 --- a/doc/quickjs-emscripten-core/interfaces/QuickJSSyncVariant.md +++ b/doc/quickjs-emscripten-core/interfaces/QuickJSSyncVariant.md @@ -36,7 +36,7 @@ build variant to newQuickJSWASMModule or newQuickJSAsyncWASMModule. #### Source -packages/quickjs-ffi-types/dist/index.d.ts:374 +packages/quickjs-ffi-types/dist/index.d.ts:437 *** @@ -50,7 +50,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:374 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:375 +packages/quickjs-ffi-types/dist/index.d.ts:438 *** @@ -60,7 +60,7 @@ packages/quickjs-ffi-types/dist/index.d.ts:375 #### Source -packages/quickjs-ffi-types/dist/index.d.ts:373 +packages/quickjs-ffi-types/dist/index.d.ts:436 *** diff --git a/doc/quickjs-emscripten-core/interfaces/SourceMapData.md b/doc/quickjs-emscripten-core/interfaces/SourceMapData.md new file mode 100644 index 00000000..e27456b6 --- /dev/null +++ b/doc/quickjs-emscripten-core/interfaces/SourceMapData.md @@ -0,0 +1,59 @@ +[quickjs-emscripten](../../packages.md) • **quickjs-emscripten-core** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../packages.md) / [quickjs-emscripten-core](../exports.md) / SourceMapData + +# Interface: SourceMapData + +## Contents + +- [Properties](SourceMapData.md#properties) + - [mappings](SourceMapData.md#mappings) + - [names](SourceMapData.md#names) + - [sources](SourceMapData.md#sources) + - [version](SourceMapData.md#version) + +## Properties + +### mappings + +> **mappings**: `string` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:145 + +*** + +### names + +> **names**: `string`[] + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:144 + +*** + +### sources + +> **sources**: `string`[] + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:143 + +*** + +### version + +> **version**: `number` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:142 + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/quickjs-emscripten-core/namespaces/errors/README.md b/doc/quickjs-emscripten-core/namespaces/errors/README.md index 2bcf7ac5..4a3709d3 100644 --- a/doc/quickjs-emscripten-core/namespaces/errors/README.md +++ b/doc/quickjs-emscripten-core/namespaces/errors/README.md @@ -14,6 +14,7 @@ Collects the informative errors this library may throw. - [QuickJSAsyncifyError](classes/QuickJSAsyncifyError.md) - [QuickJSAsyncifySuspended](classes/QuickJSAsyncifySuspended.md) +- [QuickJSEmscriptenModuleError](classes/QuickJSEmscriptenModuleError.md) - [QuickJSMemoryLeakDetected](classes/QuickJSMemoryLeakDetected.md) - [QuickJSNotImplemented](classes/QuickJSNotImplemented.md) - [QuickJSUnwrapError](classes/QuickJSUnwrapError.md) diff --git a/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmscriptenModuleError.md b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmscriptenModuleError.md new file mode 100644 index 00000000..0d707d15 --- /dev/null +++ b/doc/quickjs-emscripten-core/namespaces/errors/classes/QuickJSEmscriptenModuleError.md @@ -0,0 +1,59 @@ +[quickjs-emscripten](../../../../packages.md) • **quickjs-emscripten-core** • [Readme](../../../README.md) \| [Exports](../../../exports.md) + +*** + +[quickjs-emscripten](../../../../packages.md) / [quickjs-emscripten-core](../../../exports.md) / [errors](../README.md) / QuickJSEmscriptenModuleError + +# Class: QuickJSEmscriptenModuleError + +## Contents + +- [Extends](QuickJSEmscriptenModuleError.md#extends) +- [Constructors](QuickJSEmscriptenModuleError.md#constructors) + - [new QuickJSEmscriptenModuleError(message)](QuickJSEmscriptenModuleError.md#new-quickjsemscriptenmoduleerrormessage) +- [Properties](QuickJSEmscriptenModuleError.md#properties) + - [name](QuickJSEmscriptenModuleError.md#name) + +## Extends + +- `Error` + +## Constructors + +### new QuickJSEmscriptenModuleError(message) + +> **new QuickJSEmscriptenModuleError**(`message`?): [`QuickJSEmscriptenModuleError`](QuickJSEmscriptenModuleError.md) + +#### Parameters + +• **message?**: `string` + +#### Returns + +[`QuickJSEmscriptenModuleError`](QuickJSEmscriptenModuleError.md) + +#### Inherited from + +`Error.constructor` + +#### Source + +node\_modules/typescript/lib/lib.es5.d.ts:1081 + +## Properties + +### name + +> **name**: `string` = `"QuickJSEmscriptenModuleError"` + +#### Overrides + +`Error.name` + +#### Source + +[packages/quickjs-emscripten-core/src/errors.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten-core/src/errors.ts#L41) + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/quickjs-emscripten/README.md b/doc/quickjs-emscripten/README.md index 616c908f..8b5105c6 100644 --- a/doc/quickjs-emscripten/README.md +++ b/doc/quickjs-emscripten/README.md @@ -62,11 +62,13 @@ main() - [Async module loader](#async-module-loader) - [Async on host, sync in QuickJS](#async-on-host-sync-in-quickjs) - [Testing your code](#testing-your-code) - - [Using in the browser without a build step](#using-in-the-browser-without-a-build-step) - - [quickjs-emscripten-core, variants, and advanced packaging](#quickjs-emscripten-core-variants-and-advanced-packaging) + - [Packaging](#packaging) + - [Reducing package size](#reducing-package-size) + - [WebAssembly loading](#webassembly-loading) + - [Using in the browser without a build step](#using-in-the-browser-without-a-build-step) - [Debugging](#debugging) + - [Supported Platforms](#supported-platforms) - [More Documentation](#more-documentation) - - [Requirements](#requirements) - [Background](#background) - [Status \& Roadmap](#status--roadmap) - [Related](#related) @@ -83,11 +85,10 @@ main() - [Memory Management](README.md#memory-management) - [Exposing APIs](README.md#exposing-apis) - [Testing your code](README.md#testing-your-code) - - [Using in the browser without a build step](README.md#using-in-the-browser-without-a-build-step) - - [quickjs-emscripten-core, variants, and advanced packaging](README.md#quickjs-emscripten-core-variants-and-advanced-packaging) + - [Packaging](README.md#packaging) - [Debugging](README.md#debugging) + - [Supported Platforms](README.md#supported-platforms) - [More Documentation](README.md#more-documentation) - - [Requirements](README.md#requirements) - [Background](README.md#background) - [Status & Roadmap](README.md#status-roadmap) - [Related](README.md#related) @@ -540,7 +541,97 @@ For more testing examples, please explore the typescript source of [quickjs-emsc [debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/exports.md#debug_sync [testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md -### Using in the browser without a build step +### Packaging + +The main `quickjs-emscripten` package includes several build variants of the WebAssembly module: + +- `RELEASE...` build variants should be used in production. They offer better performance and smaller file size compared to `DEBUG...` build variants. + - `RELEASE_SYNC`: This is the default variant used when you don't explicitly provide one. It offers the fastest performance and smallest file size. + - `RELEASE_ASYNC`: The default variant if you need [asyncify][] magic, which comes at a performance cost. See the asyncify docs for details. +- `DEBUG...` build variants can be helpful during development and testing. They include source maps and assertions for catching bugs in your code. We recommend running your tests with _both_ a debug build variant and the release build variant you'll use in production. + - `DEBUG_SYNC`: Instrumented to detect memory leaks, in addition to assertions and source maps. + - `DEBUG_ASYNC`: An [asyncify][] variant with source maps. + +To use a variant, call `newQuickJSWASMModule` or `newQuickJSAsyncWASMModule` with the variant object. These functions return a promise that resolves to a [QuickJSWASMModule](./doc/quickjs-emscripten/classes/QuickJSWASMModule.md), the same as `getQuickJS`. + +```typescript +import { + newQuickJSWASMModule, newQuickJSAsyncWASMModule, + RELEASE_SYNC, DEBUG_SYNC, + RELEASE_ASYNC, DEBUG_ASYNC, +} from 'quickjs-emscripten' + +const QuickJSReleaseSync = await newQuickJSWASMModule(RELEASE_SYNC) +const QuickJSDebugSync = await newQuickJSWASMModule(DEBUG_SYNC) +const QuickJSReleaseAsync = await newQuickJSAsyncWASMModule(RELEASE_ASYNC) +const QuickJSDebugAsync = await newQuickJSAsyncWASMModule(DEBUG_ASYNC) + +for (const quickjs of [QuickJSReleaseSync, QuickJSDebugSync, QuickJSReleaseAsync, QuickJSDebugAsync]) { + const vm = quickjs.newContext() + const result = vm.unwrapResult(vm.evalCode("1 + 1")).consume(vm.getNumber) + console.log(result) + vm.dispose() + quickjs.dispose() +} +``` + +#### Reducing package size + +Including 4 different copies of the WebAssembly module in the main package gives it an install size of [about 9.04mb](https://packagephobia.com/result?p=quickjs-emscripten). If you're building a CLI package or library of your own, or otherwise don't need to include 4 different variants in your `node_modules`, you can switch to the `quickjs-emscripten-core` package, which contains only the Javascript code for this library, and install one (or more) variants a-la-carte as separate packages. + +The most minimal setup would be to install `quickjs-emscripten-core` and `@jitl/quickjs-wasmfile-release-sync` (1.3M total): + +```bash +yarn add quickjs-emscripten-core @jitl/quickjs-wasmfile-release-sync +du -h node_modules +# 640K node_modules/@jitl/quickjs-wasmfile-release-sync +# 80K node_modules/@jitl/quickjs-ffi-types +# 588K node_modules/quickjs-emscripten-core +# 1.3M node_modules +``` + +Then, you can use quickjs-emscripten-core's `newQuickJSWASMModuleFromVariant` to create a QuickJS module (see [the minimal example][minimal]): + +```typescript +// src/quickjs.mjs +import { newQuickJSWASMModuleFromVariant } from 'quickjs-emscripten-core' +import RELEASE_SYNC from '@jitl/quickjs-wasmfile-release-sync' +export const QuickJS = await newQuickJSWASMModuleFromVariant(RELEASE_SYNC) + +// src/app.mjs +import { QuickJS } from './quickjs.mjs' +console.log(QuickJS.evalCode("1 + 1")) +``` + +See the [documentation of quickjs-emscripten-core][core] for more details and the list of variant packages. + +[core]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten-core/README.md + +#### WebAssembly loading + +To run QuickJS, we need to load a WebAssembly module into the host Javascript runtime's memory (usually as an ArrayBuffer or TypedArray) and [compile it](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/instantiate_static) to a [WebAssembly.Module](https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Module). This means we need to find the file path or URI of the WebAssembly module, and then read it using an API like `fetch` (browser) or `fs.readFile` (NodeJS). `quickjs-emscripten` tries to handle this automatically using patterns like `new URL('./local-path', import.meta.url)` that work in the browser or are handled automatically by bundlers, or `__dirname` in NodeJS, but you may need to configure this manually if these don't work in your environment, or you want more control about how the WebAssembly module is loaded. + +To customize the loading of an existing variant, create a new variant with your loading settings using `newVariant`, passing [CustomizeVariantOptions][newVariant]. For example, you need to customize loading in Cloudflare Workers (see [the full example][cloudflare]). + +```typescript +import { newQuickJSWASMModule, DEBUG_SYNC as baseVariant, newVariant } from 'quickjs-emscripten'; +import cloudflareWasmModule from './DEBUG_SYNC.wasm'; +import cloudflareWasmModuleSourceMap from './DEBUG_SYNC.wasm.map.txt'; + +/** + * We need to make a new variant that directly passes the imported WebAssembly.Module + * to Emscripten. Normally we'd load the wasm file as bytes from a URL, but + * that's forbidden in Cloudflare workers. + */ +const cloudflareVariant = newVariant(baseVariant, { + wasmModule: cloudflareWasmModule, + wasmSourceMapData: cloudflareWasmModuleSourceMap, +}); +``` + +[newVariant]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md + +#### Using in the browser without a build step You can use quickjs-emscripten directly from an HTML file in two ways: @@ -573,16 +664,6 @@ You can use quickjs-emscripten directly from an HTML file in two ways: ``` -### quickjs-emscripten-core, variants, and advanced packaging - -Them main `quickjs-emscripten` package includes several build variants of the WebAssembly module. -If these variants are too large for you, you can instead use the `quickjs-emscripten-core` package, -and manually select your own build variant. - -See the [documentation of quickjs-emscripten-core][core] for more details. - -[core]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten-core/README.md - ### Debugging - Switch to a DEBUG build variant of the WebAssembly module to see debug log messages from the C part of this library: @@ -620,24 +701,35 @@ See the [documentation of quickjs-emscripten-core][core] for more details. [setDebugMode]: doc/quickjs-emscripten/exports.md#setdebugmode -### More Documentation - -[Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] - -### Requirements +### Supported Platforms `quickjs-emscripten` and related packages should work in any environment that supports ES2020. -- NodeJS: requires v16.0.0 or later for WebAssembly compatibility. Tested with node@18. -- We estimate support for the following browsers: +- Browsers: we estimate support for the following browser versions. See the [global-iife][iife] and [esmodule][esm-html] HTML examples. - Chrome 63+ - Edge 79+ - Safari 11.1+ - Firefox 58+ +- NodeJS: requires v16.0.0 or later for WebAssembly compatibility. Tested with node@18. See the [node-typescript][tsx-example] and [node-minimal][minimal] examples. +- Typescript: tested with typescript@4.5.5 and typescript@5.3.3. See the [node-typescript example][tsx-example]. +- Vite: tested with vite@5.0.10. See the [Vite/Vue example][vite]. +- Create react app: tested with react-scripts@5.0.1. See the [create-react-app example][cra]. - Webpack: tested with webpack@5.89.0 via create-react-app. -- Vite: tested with vite@5.0.10. -- Typescript: tested with typescript@4.5.5 and typescript@5.3.3. -- Create react app: tested with react-scripts@5.0.1. +- Cloudflare Workers: tested with wrangler@3.22.1. See the [Cloudflare Workers example][cloudflare]. +- Deno: tested with deno 1.39.1. See the [Deno example][deno]. + +[iife]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/global-iife.html +[esm-html]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/esmodule.html +[deno]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/deno +[vite]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/vite-vue +[cra]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/create-react-app +[cloudflare]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/cloudflare-workers +[tsx-example]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/node-typescript +[minimal]: https://github.com/justjake/quickjs-emscripten/blob/main/examples/node-minimal + +### More Documentation + +[Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] ## Background diff --git a/doc/quickjs-emscripten/classes/Lifetime.md b/doc/quickjs-emscripten/classes/Lifetime.md index 281d93b2..64548df3 100644 --- a/doc/quickjs-emscripten/classes/Lifetime.md +++ b/doc/quickjs-emscripten/classes/Lifetime.md @@ -81,7 +81,7 @@ the creator. #### Source -quickjs-emscripten-core/dist/index.d.ts:521 +packages/quickjs-emscripten-core/dist/index.d.ts:521 ## Properties @@ -91,7 +91,7 @@ quickjs-emscripten-core/dist/index.d.ts:521 #### Source -quickjs-emscripten-core/dist/index.d.ts:511 +packages/quickjs-emscripten-core/dist/index.d.ts:511 *** @@ -101,7 +101,7 @@ quickjs-emscripten-core/dist/index.d.ts:511 #### Source -quickjs-emscripten-core/dist/index.d.ts:512 +packages/quickjs-emscripten-core/dist/index.d.ts:512 *** @@ -111,7 +111,7 @@ quickjs-emscripten-core/dist/index.d.ts:512 #### Source -quickjs-emscripten-core/dist/index.d.ts:510 +packages/quickjs-emscripten-core/dist/index.d.ts:510 *** @@ -121,7 +121,7 @@ quickjs-emscripten-core/dist/index.d.ts:510 #### Source -quickjs-emscripten-core/dist/index.d.ts:507 +packages/quickjs-emscripten-core/dist/index.d.ts:507 *** @@ -139,7 +139,7 @@ quickjs-emscripten-core/dist/index.d.ts:507 #### Source -quickjs-emscripten-core/dist/index.d.ts:508 +packages/quickjs-emscripten-core/dist/index.d.ts:508 *** @@ -157,7 +157,7 @@ quickjs-emscripten-core/dist/index.d.ts:508 #### Source -quickjs-emscripten-core/dist/index.d.ts:509 +packages/quickjs-emscripten-core/dist/index.d.ts:509 ## Accessors @@ -175,7 +175,7 @@ false after the object has been [dispose](Lifetime.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:522 +packages/quickjs-emscripten-core/dist/index.d.ts:522 *** @@ -189,7 +189,7 @@ quickjs-emscripten-core/dist/index.d.ts:522 #### Source -quickjs-emscripten-core/dist/index.d.ts:531 +packages/quickjs-emscripten-core/dist/index.d.ts:531 *** @@ -203,7 +203,7 @@ quickjs-emscripten-core/dist/index.d.ts:531 #### Source -quickjs-emscripten-core/dist/index.d.ts:530 +packages/quickjs-emscripten-core/dist/index.d.ts:530 *** @@ -224,7 +224,7 @@ If the lifetime has been [dispose](Lifetime.md#dispose)d already. #### Source -quickjs-emscripten-core/dist/index.d.ts:529 +packages/quickjs-emscripten-core/dist/index.d.ts:529 ## Methods @@ -252,7 +252,7 @@ the result of `map(this)`. ##### Source -quickjs-emscripten-core/dist/index.d.ts:540 +packages/quickjs-emscripten-core/dist/index.d.ts:540 #### consume(map) @@ -272,7 +272,7 @@ quickjs-emscripten-core/dist/index.d.ts:540 ##### Source -quickjs-emscripten-core/dist/index.d.ts:541 +packages/quickjs-emscripten-core/dist/index.d.ts:541 *** @@ -292,7 +292,7 @@ Dispose of [value](Lifetime.md#value-1) and perform cleanup. #### Source -quickjs-emscripten-core/dist/index.d.ts:545 +packages/quickjs-emscripten-core/dist/index.d.ts:545 *** @@ -308,7 +308,7 @@ Create a new handle pointing to the same [value](Lifetime.md#value-1). #### Source -quickjs-emscripten-core/dist/index.d.ts:535 +packages/quickjs-emscripten-core/dist/index.d.ts:535 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md index 6cdb4374..862b0aee 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md @@ -100,7 +100,7 @@ to create a new QuickJSContext. #### Source -quickjs-emscripten-core/dist/index.d.ts:766 +packages/quickjs-emscripten-core/dist/index.d.ts:766 ## Properties @@ -116,7 +116,7 @@ The runtime that created this context. #### Source -quickjs-emscripten-core/dist/index.d.ts:319 +packages/quickjs-emscripten-core/dist/index.d.ts:319 ## Accessors @@ -134,7 +134,7 @@ false after the object has been [dispose](QuickJSAsyncContext.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:775 +packages/quickjs-emscripten-core/dist/index.d.ts:775 *** @@ -150,7 +150,7 @@ quickjs-emscripten-core/dist/index.d.ts:775 #### Source -quickjs-emscripten-core/dist/index.d.ts:798 +packages/quickjs-emscripten-core/dist/index.d.ts:798 *** @@ -168,7 +168,7 @@ You can set properties to create global variables. #### Source -quickjs-emscripten-core/dist/index.d.ts:804 +packages/quickjs-emscripten-core/dist/index.d.ts:804 *** @@ -184,7 +184,7 @@ quickjs-emscripten-core/dist/index.d.ts:804 #### Source -quickjs-emscripten-core/dist/index.d.ts:790 +packages/quickjs-emscripten-core/dist/index.d.ts:790 *** @@ -200,7 +200,7 @@ quickjs-emscripten-core/dist/index.d.ts:790 #### Source -quickjs-emscripten-core/dist/index.d.ts:794 +packages/quickjs-emscripten-core/dist/index.d.ts:794 *** @@ -216,7 +216,7 @@ quickjs-emscripten-core/dist/index.d.ts:794 #### Source -quickjs-emscripten-core/dist/index.d.ts:786 +packages/quickjs-emscripten-core/dist/index.d.ts:786 ## Methods @@ -254,7 +254,7 @@ value. #### Source -quickjs-emscripten-core/dist/index.d.ts:970 +packages/quickjs-emscripten-core/dist/index.d.ts:970 *** @@ -287,7 +287,7 @@ socket.on("data", chunk => { #### Source -quickjs-emscripten-core/dist/index.d.ts:1063 +packages/quickjs-emscripten-core/dist/index.d.ts:1063 *** @@ -318,7 +318,7 @@ Javascript string or number (which will be converted automatically to a JSValue) #### Source -quickjs-emscripten-core/dist/index.d.ts:956 +packages/quickjs-emscripten-core/dist/index.d.ts:956 *** @@ -343,7 +343,7 @@ will result in an error. #### Source -quickjs-emscripten-core/dist/index.d.ts:782 +packages/quickjs-emscripten-core/dist/index.d.ts:782 *** @@ -368,7 +368,7 @@ Returns `handle.toString()` if it cannot be serialized to JSON. #### Source -quickjs-emscripten-core/dist/index.d.ts:1016 +packages/quickjs-emscripten-core/dist/index.d.ts:1016 *** @@ -402,7 +402,7 @@ socket.write(dataLifetime?.value) #### Source -quickjs-emscripten-core/dist/index.d.ts:1050 +packages/quickjs-emscripten-core/dist/index.d.ts:1050 *** @@ -452,7 +452,7 @@ interrupted, the error will have name `InternalError` and message #### Source -quickjs-emscripten-core/dist/index.d.ts:991 +packages/quickjs-emscripten-core/dist/index.d.ts:991 *** @@ -478,7 +478,7 @@ See [EvalFlags](../exports.md#evalflags) for number semantics #### Source -quickjs-emscripten-core/dist/index.d.ts:331 +packages/quickjs-emscripten-core/dist/index.d.ts:331 *** @@ -502,7 +502,7 @@ Coverts `handle` to a JavaScript ArrayBuffer #### Source -quickjs-emscripten-core/dist/index.d.ts:918 +packages/quickjs-emscripten-core/dist/index.d.ts:918 *** @@ -526,7 +526,7 @@ Converts `handle` to a Javascript bigint. #### Source -quickjs-emscripten-core/dist/index.d.ts:914 +packages/quickjs-emscripten-core/dist/index.d.ts:914 *** @@ -552,7 +552,7 @@ Converts `handle` into a Javascript number. #### Source -quickjs-emscripten-core/dist/index.d.ts:901 +packages/quickjs-emscripten-core/dist/index.d.ts:901 *** @@ -582,7 +582,7 @@ Javascript string (which will be converted automatically). #### Source -quickjs-emscripten-core/dist/index.d.ts:937 +packages/quickjs-emscripten-core/dist/index.d.ts:937 *** @@ -606,7 +606,7 @@ Converts `handle` to a Javascript string. #### Source -quickjs-emscripten-core/dist/index.d.ts:905 +packages/quickjs-emscripten-core/dist/index.d.ts:905 *** @@ -631,7 +631,7 @@ registry in the guest, it will be created with Symbol.for on the host. #### Source -quickjs-emscripten-core/dist/index.d.ts:910 +packages/quickjs-emscripten-core/dist/index.d.ts:910 *** @@ -652,7 +652,7 @@ Create a new QuickJS [array](https://developer.mozilla.org/en-US/docs/Web/JavaSc #### Source -quickjs-emscripten-core/dist/index.d.ts:838 +packages/quickjs-emscripten-core/dist/index.d.ts:838 *** @@ -676,7 +676,7 @@ Create a new QuickJS [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/ #### Source -quickjs-emscripten-core/dist/index.d.ts:842 +packages/quickjs-emscripten-core/dist/index.d.ts:842 *** @@ -708,7 +708,7 @@ See [Emscripten's docs on Asyncify](https://emscripten.org/docs/porting/asyncify #### Source -quickjs-emscripten-core/dist/index.d.ts:347 +packages/quickjs-emscripten-core/dist/index.d.ts:347 *** @@ -732,7 +732,7 @@ Create a QuickJS [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScrip #### Source -quickjs-emscripten-core/dist/index.d.ts:826 +packages/quickjs-emscripten-core/dist/index.d.ts:826 *** @@ -760,7 +760,7 @@ quickjs-emscripten-core/dist/index.d.ts:826 ##### Source -quickjs-emscripten-core/dist/index.d.ts:884 +packages/quickjs-emscripten-core/dist/index.d.ts:884 #### newError(message) @@ -780,7 +780,7 @@ quickjs-emscripten-core/dist/index.d.ts:884 ##### Source -quickjs-emscripten-core/dist/index.d.ts:888 +packages/quickjs-emscripten-core/dist/index.d.ts:888 #### newError(undefined) @@ -796,7 +796,7 @@ quickjs-emscripten-core/dist/index.d.ts:888 ##### Source -quickjs-emscripten-core/dist/index.d.ts:889 +packages/quickjs-emscripten-core/dist/index.d.ts:889 *** @@ -837,7 +837,7 @@ return deferred.handle #### Source -quickjs-emscripten-core/dist/index.d.ts:883 +packages/quickjs-emscripten-core/dist/index.d.ts:883 *** @@ -861,7 +861,7 @@ Converts a Javascript number into a QuickJS value. #### Source -quickjs-emscripten-core/dist/index.d.ts:808 +packages/quickjs-emscripten-core/dist/index.d.ts:808 *** @@ -888,7 +888,7 @@ Like [`Object.create`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/R #### Source -quickjs-emscripten-core/dist/index.d.ts:833 +packages/quickjs-emscripten-core/dist/index.d.ts:833 *** @@ -913,7 +913,7 @@ resources; see the documentation on [QuickJSDeferredPromise](QuickJSDeferredProm ##### Source -quickjs-emscripten-core/dist/index.d.ts:849 +packages/quickjs-emscripten-core/dist/index.d.ts:849 #### newPromise(promise) @@ -939,7 +939,7 @@ You can still resolve/reject the created promise "early" using its methods. ##### Source -quickjs-emscripten-core/dist/index.d.ts:857 +packages/quickjs-emscripten-core/dist/index.d.ts:857 #### newPromise(newPromiseFn) @@ -964,7 +964,7 @@ You can still resolve/reject the created promise "early" using its methods. ##### Source -quickjs-emscripten-core/dist/index.d.ts:864 +packages/quickjs-emscripten-core/dist/index.d.ts:864 *** @@ -988,7 +988,7 @@ Create a QuickJS [string](https://developer.mozilla.org/en-US/docs/Web/JavaScrip #### Source -quickjs-emscripten-core/dist/index.d.ts:812 +packages/quickjs-emscripten-core/dist/index.d.ts:812 *** @@ -1013,7 +1013,7 @@ All symbols created with the same key will be the same value. #### Source -quickjs-emscripten-core/dist/index.d.ts:822 +packages/quickjs-emscripten-core/dist/index.d.ts:822 *** @@ -1038,7 +1038,7 @@ No two symbols created with this function will be the same value. #### Source -quickjs-emscripten-core/dist/index.d.ts:817 +packages/quickjs-emscripten-core/dist/index.d.ts:817 *** @@ -1070,7 +1070,7 @@ You may need to call [runtime](QuickJSAsyncContext.md#runtime).[QuickJSRuntime#e #### Source -quickjs-emscripten-core/dist/index.d.ts:929 +packages/quickjs-emscripten-core/dist/index.d.ts:929 *** @@ -1107,7 +1107,7 @@ properties. #### Source -quickjs-emscripten-core/dist/index.d.ts:949 +packages/quickjs-emscripten-core/dist/index.d.ts:949 *** @@ -1131,7 +1131,7 @@ Throw an error in the VM, interrupted whatever current execution is in progress #### Source -quickjs-emscripten-core/dist/index.d.ts:1003 +packages/quickjs-emscripten-core/dist/index.d.ts:1003 *** @@ -1159,7 +1159,7 @@ Does not support BigInt values correctly. #### Source -quickjs-emscripten-core/dist/index.d.ts:896 +packages/quickjs-emscripten-core/dist/index.d.ts:896 *** @@ -1190,7 +1190,7 @@ If the result is an error, converts the error to a native object and throws the #### Source -quickjs-emscripten-core/dist/index.d.ts:1023 +packages/quickjs-emscripten-core/dist/index.d.ts:1023 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md b/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md index 64b3054e..ce1385c6 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md @@ -74,7 +74,7 @@ A context here may be allocated if one is needed by the runtime, eg for [compute #### Source -quickjs-emscripten-core/dist/index.d.ts:280 +packages/quickjs-emscripten-core/dist/index.d.ts:280 ## Accessors @@ -92,7 +92,7 @@ false after the object has been [dispose](QuickJSAsyncRuntime.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:187 +packages/quickjs-emscripten-core/dist/index.d.ts:187 ## Methods @@ -120,7 +120,7 @@ QuickJSWrongOwner if owned by a different runtime. #### Source -quickjs-emscripten-core/dist/index.d.ts:274 +packages/quickjs-emscripten-core/dist/index.d.ts:274 *** @@ -144,7 +144,7 @@ For a human-digestible representation, see [dumpMemoryUsage](QuickJSAsyncRuntime #### Source -quickjs-emscripten-core/dist/index.d.ts:259 +packages/quickjs-emscripten-core/dist/index.d.ts:259 *** @@ -164,7 +164,7 @@ Dispose of the underlying resources used by this object. #### Source -quickjs-emscripten-core/dist/index.d.ts:188 +packages/quickjs-emscripten-core/dist/index.d.ts:188 *** @@ -185,7 +185,7 @@ For programmatic access to this information, see [computeMemoryUsage](QuickJSAsy #### Source -quickjs-emscripten-core/dist/index.d.ts:264 +packages/quickjs-emscripten-core/dist/index.d.ts:264 *** @@ -223,7 +223,7 @@ functions or rejected promises. Those errors are available by calling #### Source -quickjs-emscripten-core/dist/index.d.ts:246 +packages/quickjs-emscripten-core/dist/index.d.ts:246 *** @@ -246,7 +246,7 @@ true if there is at least one pendingJob queued up. #### Source -quickjs-emscripten-core/dist/index.d.ts:214 +packages/quickjs-emscripten-core/dist/index.d.ts:214 *** @@ -274,7 +274,7 @@ You should dispose a created context before disposing this runtime. #### Source -quickjs-emscripten-core/dist/index.d.ts:298 +packages/quickjs-emscripten-core/dist/index.d.ts:298 *** @@ -295,7 +295,7 @@ See [setInterruptHandler](QuickJSAsyncRuntime.md#setinterrupthandler). #### Source -quickjs-emscripten-core/dist/index.d.ts:228 +packages/quickjs-emscripten-core/dist/index.d.ts:228 *** @@ -315,7 +315,7 @@ Remove the the loader set by [setModuleLoader](QuickJSAsyncRuntime.md#setmodulel #### Source -quickjs-emscripten-core/dist/index.d.ts:207 +packages/quickjs-emscripten-core/dist/index.d.ts:207 *** @@ -343,7 +343,7 @@ The interrupt handler can be removed with [removeInterruptHandler](QuickJSAsyncR #### Source -quickjs-emscripten-core/dist/index.d.ts:223 +packages/quickjs-emscripten-core/dist/index.d.ts:223 *** @@ -371,7 +371,7 @@ See the [pull request](https://github.com/justjake/quickjs-emscripten/pull/114) #### Source -quickjs-emscripten-core/dist/index.d.ts:307 +packages/quickjs-emscripten-core/dist/index.d.ts:307 *** @@ -396,7 +396,7 @@ To remove the limit, set to `-1`. #### Source -quickjs-emscripten-core/dist/index.d.ts:251 +packages/quickjs-emscripten-core/dist/index.d.ts:251 *** @@ -425,7 +425,7 @@ The loader can be removed with [removeModuleLoader](QuickJSAsyncRuntime.md#remov #### Source -quickjs-emscripten-core/dist/index.d.ts:299 +packages/quickjs-emscripten-core/dist/index.d.ts:299 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md b/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md index b0d97d2c..ca131913 100644 --- a/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md +++ b/doc/quickjs-emscripten/classes/QuickJSAsyncWASMModule.md @@ -49,7 +49,7 @@ Synchronous evalCode is not supported. #### Source -quickjs-emscripten-core/dist/index.d.ts:1236 +packages/quickjs-emscripten-core/dist/index.d.ts:1236 *** @@ -79,7 +79,7 @@ See the documentation for [QuickJSWASMModule#evalCode](QuickJSWASMModule.md#eval #### Source -quickjs-emscripten-core/dist/index.d.ts:1248 +packages/quickjs-emscripten-core/dist/index.d.ts:1248 *** @@ -105,7 +105,7 @@ be disposed when the context is disposed. #### Source -quickjs-emscripten-core/dist/index.d.ts:1234 +packages/quickjs-emscripten-core/dist/index.d.ts:1234 *** @@ -131,7 +131,7 @@ concurrent async actions, create multiple WebAssembly modules. #### Source -quickjs-emscripten-core/dist/index.d.ts:1228 +packages/quickjs-emscripten-core/dist/index.d.ts:1228 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSContext.md b/doc/quickjs-emscripten/classes/QuickJSContext.md index e73bf65b..f84997d5 100644 --- a/doc/quickjs-emscripten/classes/QuickJSContext.md +++ b/doc/quickjs-emscripten/classes/QuickJSContext.md @@ -124,7 +124,7 @@ to create a new QuickJSContext. #### Source -quickjs-emscripten-core/dist/index.d.ts:766 +packages/quickjs-emscripten-core/dist/index.d.ts:766 ## Properties @@ -136,7 +136,7 @@ The runtime that created this context. #### Source -quickjs-emscripten-core/dist/index.d.ts:739 +packages/quickjs-emscripten-core/dist/index.d.ts:739 ## Accessors @@ -154,7 +154,7 @@ false after the object has been [dispose](QuickJSContext.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:775 +packages/quickjs-emscripten-core/dist/index.d.ts:775 *** @@ -170,7 +170,7 @@ quickjs-emscripten-core/dist/index.d.ts:775 #### Source -quickjs-emscripten-core/dist/index.d.ts:798 +packages/quickjs-emscripten-core/dist/index.d.ts:798 *** @@ -188,7 +188,7 @@ You can set properties to create global variables. #### Source -quickjs-emscripten-core/dist/index.d.ts:804 +packages/quickjs-emscripten-core/dist/index.d.ts:804 *** @@ -204,7 +204,7 @@ quickjs-emscripten-core/dist/index.d.ts:804 #### Source -quickjs-emscripten-core/dist/index.d.ts:790 +packages/quickjs-emscripten-core/dist/index.d.ts:790 *** @@ -220,7 +220,7 @@ quickjs-emscripten-core/dist/index.d.ts:790 #### Source -quickjs-emscripten-core/dist/index.d.ts:794 +packages/quickjs-emscripten-core/dist/index.d.ts:794 *** @@ -236,7 +236,7 @@ quickjs-emscripten-core/dist/index.d.ts:794 #### Source -quickjs-emscripten-core/dist/index.d.ts:786 +packages/quickjs-emscripten-core/dist/index.d.ts:786 ## Methods @@ -274,7 +274,7 @@ value. #### Source -quickjs-emscripten-core/dist/index.d.ts:970 +packages/quickjs-emscripten-core/dist/index.d.ts:970 *** @@ -303,7 +303,7 @@ socket.on("data", chunk => { #### Source -quickjs-emscripten-core/dist/index.d.ts:1063 +packages/quickjs-emscripten-core/dist/index.d.ts:1063 *** @@ -334,7 +334,7 @@ Javascript string or number (which will be converted automatically to a JSValue) #### Source -quickjs-emscripten-core/dist/index.d.ts:956 +packages/quickjs-emscripten-core/dist/index.d.ts:956 *** @@ -359,7 +359,7 @@ will result in an error. #### Source -quickjs-emscripten-core/dist/index.d.ts:782 +packages/quickjs-emscripten-core/dist/index.d.ts:782 *** @@ -380,7 +380,7 @@ Returns `handle.toString()` if it cannot be serialized to JSON. #### Source -quickjs-emscripten-core/dist/index.d.ts:1016 +packages/quickjs-emscripten-core/dist/index.d.ts:1016 *** @@ -410,7 +410,7 @@ socket.write(dataLifetime?.value) #### Source -quickjs-emscripten-core/dist/index.d.ts:1050 +packages/quickjs-emscripten-core/dist/index.d.ts:1050 *** @@ -460,7 +460,7 @@ interrupted, the error will have name `InternalError` and message #### Source -quickjs-emscripten-core/dist/index.d.ts:991 +packages/quickjs-emscripten-core/dist/index.d.ts:991 *** @@ -480,7 +480,7 @@ Coverts `handle` to a JavaScript ArrayBuffer #### Source -quickjs-emscripten-core/dist/index.d.ts:918 +packages/quickjs-emscripten-core/dist/index.d.ts:918 *** @@ -500,7 +500,7 @@ Converts `handle` to a Javascript bigint. #### Source -quickjs-emscripten-core/dist/index.d.ts:914 +packages/quickjs-emscripten-core/dist/index.d.ts:914 *** @@ -526,7 +526,7 @@ Converts `handle` into a Javascript number. #### Source -quickjs-emscripten-core/dist/index.d.ts:901 +packages/quickjs-emscripten-core/dist/index.d.ts:901 *** @@ -556,7 +556,7 @@ Javascript string (which will be converted automatically). #### Source -quickjs-emscripten-core/dist/index.d.ts:937 +packages/quickjs-emscripten-core/dist/index.d.ts:937 *** @@ -580,7 +580,7 @@ Converts `handle` to a Javascript string. #### Source -quickjs-emscripten-core/dist/index.d.ts:905 +packages/quickjs-emscripten-core/dist/index.d.ts:905 *** @@ -601,7 +601,7 @@ registry in the guest, it will be created with Symbol.for on the host. #### Source -quickjs-emscripten-core/dist/index.d.ts:910 +packages/quickjs-emscripten-core/dist/index.d.ts:910 *** @@ -618,7 +618,7 @@ Create a new QuickJS [array](https://developer.mozilla.org/en-US/docs/Web/JavaSc #### Source -quickjs-emscripten-core/dist/index.d.ts:838 +packages/quickjs-emscripten-core/dist/index.d.ts:838 *** @@ -638,7 +638,7 @@ Create a new QuickJS [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/ #### Source -quickjs-emscripten-core/dist/index.d.ts:842 +packages/quickjs-emscripten-core/dist/index.d.ts:842 *** @@ -658,7 +658,7 @@ Create a QuickJS [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScrip #### Source -quickjs-emscripten-core/dist/index.d.ts:826 +packages/quickjs-emscripten-core/dist/index.d.ts:826 *** @@ -682,7 +682,7 @@ quickjs-emscripten-core/dist/index.d.ts:826 ##### Source -quickjs-emscripten-core/dist/index.d.ts:884 +packages/quickjs-emscripten-core/dist/index.d.ts:884 #### newError(message) @@ -698,7 +698,7 @@ quickjs-emscripten-core/dist/index.d.ts:884 ##### Source -quickjs-emscripten-core/dist/index.d.ts:888 +packages/quickjs-emscripten-core/dist/index.d.ts:888 #### newError(undefined) @@ -710,7 +710,7 @@ quickjs-emscripten-core/dist/index.d.ts:888 ##### Source -quickjs-emscripten-core/dist/index.d.ts:889 +packages/quickjs-emscripten-core/dist/index.d.ts:889 *** @@ -751,7 +751,7 @@ return deferred.handle #### Source -quickjs-emscripten-core/dist/index.d.ts:883 +packages/quickjs-emscripten-core/dist/index.d.ts:883 *** @@ -775,7 +775,7 @@ Converts a Javascript number into a QuickJS value. #### Source -quickjs-emscripten-core/dist/index.d.ts:808 +packages/quickjs-emscripten-core/dist/index.d.ts:808 *** @@ -802,7 +802,7 @@ Like [`Object.create`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/R #### Source -quickjs-emscripten-core/dist/index.d.ts:833 +packages/quickjs-emscripten-core/dist/index.d.ts:833 *** @@ -823,7 +823,7 @@ resources; see the documentation on [QuickJSDeferredPromise](QuickJSDeferredProm ##### Source -quickjs-emscripten-core/dist/index.d.ts:849 +packages/quickjs-emscripten-core/dist/index.d.ts:849 #### newPromise(promise) @@ -845,7 +845,7 @@ You can still resolve/reject the created promise "early" using its methods. ##### Source -quickjs-emscripten-core/dist/index.d.ts:857 +packages/quickjs-emscripten-core/dist/index.d.ts:857 #### newPromise(newPromiseFn) @@ -866,7 +866,7 @@ You can still resolve/reject the created promise "early" using its methods. ##### Source -quickjs-emscripten-core/dist/index.d.ts:864 +packages/quickjs-emscripten-core/dist/index.d.ts:864 *** @@ -890,7 +890,7 @@ Create a QuickJS [string](https://developer.mozilla.org/en-US/docs/Web/JavaScrip #### Source -quickjs-emscripten-core/dist/index.d.ts:812 +packages/quickjs-emscripten-core/dist/index.d.ts:812 *** @@ -911,7 +911,7 @@ All symbols created with the same key will be the same value. #### Source -quickjs-emscripten-core/dist/index.d.ts:822 +packages/quickjs-emscripten-core/dist/index.d.ts:822 *** @@ -932,7 +932,7 @@ No two symbols created with this function will be the same value. #### Source -quickjs-emscripten-core/dist/index.d.ts:817 +packages/quickjs-emscripten-core/dist/index.d.ts:817 *** @@ -960,7 +960,7 @@ You may need to call [runtime](QuickJSContext.md#runtime).[QuickJSRuntime#execut #### Source -quickjs-emscripten-core/dist/index.d.ts:929 +packages/quickjs-emscripten-core/dist/index.d.ts:929 *** @@ -997,7 +997,7 @@ properties. #### Source -quickjs-emscripten-core/dist/index.d.ts:949 +packages/quickjs-emscripten-core/dist/index.d.ts:949 *** @@ -1017,7 +1017,7 @@ Throw an error in the VM, interrupted whatever current execution is in progress #### Source -quickjs-emscripten-core/dist/index.d.ts:1003 +packages/quickjs-emscripten-core/dist/index.d.ts:1003 *** @@ -1045,7 +1045,7 @@ Does not support BigInt values correctly. #### Source -quickjs-emscripten-core/dist/index.d.ts:896 +packages/quickjs-emscripten-core/dist/index.d.ts:896 *** @@ -1072,7 +1072,7 @@ If the result is an error, converts the error to a native object and throws the #### Source -quickjs-emscripten-core/dist/index.d.ts:1023 +packages/quickjs-emscripten-core/dist/index.d.ts:1023 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSDeferredPromise.md b/doc/quickjs-emscripten/classes/QuickJSDeferredPromise.md index ee987af0..4eeaeb34 100644 --- a/doc/quickjs-emscripten/classes/QuickJSDeferredPromise.md +++ b/doc/quickjs-emscripten/classes/QuickJSDeferredPromise.md @@ -73,7 +73,7 @@ this constructor directly. #### Source -quickjs-emscripten-core/dist/index.d.ts:639 +packages/quickjs-emscripten-core/dist/index.d.ts:639 ## Properties @@ -83,7 +83,7 @@ quickjs-emscripten-core/dist/index.d.ts:639 #### Source -quickjs-emscripten-core/dist/index.d.ts:621 +packages/quickjs-emscripten-core/dist/index.d.ts:621 *** @@ -101,7 +101,7 @@ quickjs-emscripten-core/dist/index.d.ts:621 #### Source -quickjs-emscripten-core/dist/index.d.ts:664 +packages/quickjs-emscripten-core/dist/index.d.ts:664 *** @@ -115,7 +115,7 @@ are finished with it. #### Source -quickjs-emscripten-core/dist/index.d.ts:627 +packages/quickjs-emscripten-core/dist/index.d.ts:627 *** @@ -125,7 +125,7 @@ quickjs-emscripten-core/dist/index.d.ts:627 #### Source -quickjs-emscripten-core/dist/index.d.ts:620 +packages/quickjs-emscripten-core/dist/index.d.ts:620 *** @@ -150,7 +150,7 @@ callbacks. #### Source -quickjs-emscripten-core/dist/index.d.ts:662 +packages/quickjs-emscripten-core/dist/index.d.ts:662 *** @@ -175,7 +175,7 @@ callbacks. #### Source -quickjs-emscripten-core/dist/index.d.ts:653 +packages/quickjs-emscripten-core/dist/index.d.ts:653 *** @@ -187,7 +187,7 @@ A native promise that will resolve once this deferred is settled. #### Source -quickjs-emscripten-core/dist/index.d.ts:631 +packages/quickjs-emscripten-core/dist/index.d.ts:631 ## Accessors @@ -205,7 +205,7 @@ false after the object has been [dispose](QuickJSDeferredPromise.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:663 +packages/quickjs-emscripten-core/dist/index.d.ts:663 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSRuntime.md b/doc/quickjs-emscripten/classes/QuickJSRuntime.md index 8596ab58..a693cb7c 100644 --- a/doc/quickjs-emscripten/classes/QuickJSRuntime.md +++ b/doc/quickjs-emscripten/classes/QuickJSRuntime.md @@ -75,7 +75,7 @@ A context here may be allocated if one is needed by the runtime, eg for [compute #### Source -quickjs-emscripten-core/dist/index.d.ts:160 +packages/quickjs-emscripten-core/dist/index.d.ts:160 ## Accessors @@ -93,7 +93,7 @@ false after the object has been [dispose](QuickJSRuntime.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:187 +packages/quickjs-emscripten-core/dist/index.d.ts:187 ## Methods @@ -117,7 +117,7 @@ QuickJSWrongOwner if owned by a different runtime. #### Source -quickjs-emscripten-core/dist/index.d.ts:274 +packages/quickjs-emscripten-core/dist/index.d.ts:274 *** @@ -137,7 +137,7 @@ For a human-digestible representation, see [dumpMemoryUsage](QuickJSRuntime.md#d #### Source -quickjs-emscripten-core/dist/index.d.ts:259 +packages/quickjs-emscripten-core/dist/index.d.ts:259 *** @@ -157,7 +157,7 @@ Dispose of the underlying resources used by this object. #### Source -quickjs-emscripten-core/dist/index.d.ts:188 +packages/quickjs-emscripten-core/dist/index.d.ts:188 *** @@ -174,7 +174,7 @@ For programmatic access to this information, see [computeMemoryUsage](QuickJSRun #### Source -quickjs-emscripten-core/dist/index.d.ts:264 +packages/quickjs-emscripten-core/dist/index.d.ts:264 *** @@ -208,7 +208,7 @@ functions or rejected promises. Those errors are available by calling #### Source -quickjs-emscripten-core/dist/index.d.ts:246 +packages/quickjs-emscripten-core/dist/index.d.ts:246 *** @@ -227,7 +227,7 @@ true if there is at least one pendingJob queued up. #### Source -quickjs-emscripten-core/dist/index.d.ts:214 +packages/quickjs-emscripten-core/dist/index.d.ts:214 *** @@ -251,7 +251,7 @@ You should dispose a created context before disposing this runtime. #### Source -quickjs-emscripten-core/dist/index.d.ts:196 +packages/quickjs-emscripten-core/dist/index.d.ts:196 *** @@ -268,7 +268,7 @@ See [setInterruptHandler](QuickJSRuntime.md#setinterrupthandler). #### Source -quickjs-emscripten-core/dist/index.d.ts:228 +packages/quickjs-emscripten-core/dist/index.d.ts:228 *** @@ -284,7 +284,7 @@ Remove the the loader set by [setModuleLoader](QuickJSRuntime.md#setmoduleloader #### Source -quickjs-emscripten-core/dist/index.d.ts:207 +packages/quickjs-emscripten-core/dist/index.d.ts:207 *** @@ -308,7 +308,7 @@ The interrupt handler can be removed with [removeInterruptHandler](QuickJSRuntim #### Source -quickjs-emscripten-core/dist/index.d.ts:223 +packages/quickjs-emscripten-core/dist/index.d.ts:223 *** @@ -329,7 +329,7 @@ To remove the limit, set to `0`. #### Source -quickjs-emscripten-core/dist/index.d.ts:269 +packages/quickjs-emscripten-core/dist/index.d.ts:269 *** @@ -350,7 +350,7 @@ To remove the limit, set to `-1`. #### Source -quickjs-emscripten-core/dist/index.d.ts:251 +packages/quickjs-emscripten-core/dist/index.d.ts:251 *** @@ -375,7 +375,7 @@ The loader can be removed with [removeModuleLoader](QuickJSRuntime.md#removemodu #### Source -quickjs-emscripten-core/dist/index.d.ts:203 +packages/quickjs-emscripten-core/dist/index.d.ts:203 *** diff --git a/doc/quickjs-emscripten/classes/QuickJSWASMModule.md b/doc/quickjs-emscripten/classes/QuickJSWASMModule.md index 90ce2a0a..d287a607 100644 --- a/doc/quickjs-emscripten/classes/QuickJSWASMModule.md +++ b/doc/quickjs-emscripten/classes/QuickJSWASMModule.md @@ -80,7 +80,7 @@ with name `"InternalError"` and message `"interrupted"`. #### Source -quickjs-emscripten-core/dist/index.d.ts:1192 +packages/quickjs-emscripten-core/dist/index.d.ts:1192 *** @@ -102,7 +102,7 @@ be disposed when the context is disposed. #### Source -quickjs-emscripten-core/dist/index.d.ts:1166 +packages/quickjs-emscripten-core/dist/index.d.ts:1166 *** @@ -124,7 +124,7 @@ loading for one or more [QuickJSContext](QuickJSContext.md)s inside the runtime. #### Source -quickjs-emscripten-core/dist/index.d.ts:1160 +packages/quickjs-emscripten-core/dist/index.d.ts:1160 *** diff --git a/doc/quickjs-emscripten/classes/Scope.md b/doc/quickjs-emscripten/classes/Scope.md index 4963abd8..5fa53d86 100644 --- a/doc/quickjs-emscripten/classes/Scope.md +++ b/doc/quickjs-emscripten/classes/Scope.md @@ -53,7 +53,7 @@ false after the object has been [dispose](Scope.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:594 +packages/quickjs-emscripten-core/dist/index.d.ts:594 ## Methods @@ -73,7 +73,7 @@ Dispose of the underlying resources used by this object. #### Source -quickjs-emscripten-core/dist/index.d.ts:595 +packages/quickjs-emscripten-core/dist/index.d.ts:595 *** @@ -97,7 +97,7 @@ Track `lifetime` so that it is disposed when this scope is disposed. #### Source -quickjs-emscripten-core/dist/index.d.ts:593 +packages/quickjs-emscripten-core/dist/index.d.ts:593 *** @@ -127,7 +127,7 @@ Do not use with async functions. Instead, use [withScopeAsync](Scope.md#withscop #### Source -quickjs-emscripten-core/dist/index.d.ts:580 +packages/quickjs-emscripten-core/dist/index.d.ts:580 *** @@ -154,7 +154,7 @@ block returns. #### Source -quickjs-emscripten-core/dist/index.d.ts:588 +packages/quickjs-emscripten-core/dist/index.d.ts:588 *** @@ -182,7 +182,7 @@ quickjs-emscripten-core/dist/index.d.ts:588 #### Source -quickjs-emscripten-core/dist/index.d.ts:581 +packages/quickjs-emscripten-core/dist/index.d.ts:581 *** diff --git a/doc/quickjs-emscripten/classes/StaticLifetime.md b/doc/quickjs-emscripten/classes/StaticLifetime.md index 5831fad7..b4ed7850 100644 --- a/doc/quickjs-emscripten/classes/StaticLifetime.md +++ b/doc/quickjs-emscripten/classes/StaticLifetime.md @@ -63,7 +63,7 @@ A Lifetime that lives forever. Used for constants. #### Source -quickjs-emscripten-core/dist/index.d.ts:552 +packages/quickjs-emscripten-core/dist/index.d.ts:552 ## Properties @@ -77,7 +77,7 @@ quickjs-emscripten-core/dist/index.d.ts:552 #### Source -quickjs-emscripten-core/dist/index.d.ts:511 +packages/quickjs-emscripten-core/dist/index.d.ts:511 *** @@ -91,7 +91,7 @@ quickjs-emscripten-core/dist/index.d.ts:511 #### Source -quickjs-emscripten-core/dist/index.d.ts:512 +packages/quickjs-emscripten-core/dist/index.d.ts:512 *** @@ -105,7 +105,7 @@ quickjs-emscripten-core/dist/index.d.ts:512 #### Source -quickjs-emscripten-core/dist/index.d.ts:510 +packages/quickjs-emscripten-core/dist/index.d.ts:510 *** @@ -119,7 +119,7 @@ quickjs-emscripten-core/dist/index.d.ts:510 #### Source -quickjs-emscripten-core/dist/index.d.ts:507 +packages/quickjs-emscripten-core/dist/index.d.ts:507 *** @@ -141,7 +141,7 @@ quickjs-emscripten-core/dist/index.d.ts:507 #### Source -quickjs-emscripten-core/dist/index.d.ts:508 +packages/quickjs-emscripten-core/dist/index.d.ts:508 *** @@ -163,7 +163,7 @@ quickjs-emscripten-core/dist/index.d.ts:508 #### Source -quickjs-emscripten-core/dist/index.d.ts:509 +packages/quickjs-emscripten-core/dist/index.d.ts:509 ## Accessors @@ -181,7 +181,7 @@ false after the object has been [dispose](StaticLifetime.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:522 +packages/quickjs-emscripten-core/dist/index.d.ts:522 *** @@ -195,7 +195,7 @@ quickjs-emscripten-core/dist/index.d.ts:522 #### Source -quickjs-emscripten-core/dist/index.d.ts:553 +packages/quickjs-emscripten-core/dist/index.d.ts:553 *** @@ -209,7 +209,7 @@ quickjs-emscripten-core/dist/index.d.ts:553 #### Source -quickjs-emscripten-core/dist/index.d.ts:530 +packages/quickjs-emscripten-core/dist/index.d.ts:530 *** @@ -230,7 +230,7 @@ If the lifetime has been [dispose](StaticLifetime.md#dispose)d already. #### Source -quickjs-emscripten-core/dist/index.d.ts:529 +packages/quickjs-emscripten-core/dist/index.d.ts:529 ## Methods @@ -262,7 +262,7 @@ the result of `map(this)`. ##### Source -quickjs-emscripten-core/dist/index.d.ts:540 +packages/quickjs-emscripten-core/dist/index.d.ts:540 #### consume(map) @@ -286,7 +286,7 @@ quickjs-emscripten-core/dist/index.d.ts:540 ##### Source -quickjs-emscripten-core/dist/index.d.ts:541 +packages/quickjs-emscripten-core/dist/index.d.ts:541 *** @@ -306,7 +306,7 @@ Dispose of [value](StaticLifetime.md#value-1) and perform cleanup. #### Source -quickjs-emscripten-core/dist/index.d.ts:555 +packages/quickjs-emscripten-core/dist/index.d.ts:555 *** @@ -326,7 +326,7 @@ Create a new handle pointing to the same [value](StaticLifetime.md#value-1). #### Source -quickjs-emscripten-core/dist/index.d.ts:554 +packages/quickjs-emscripten-core/dist/index.d.ts:554 *** diff --git a/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md b/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md index b2b64820..3ba52e00 100644 --- a/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md +++ b/doc/quickjs-emscripten/classes/TestQuickJSWASMModule.md @@ -50,7 +50,7 @@ freed all the memory you've ever allocated. #### Source -quickjs-emscripten-core/dist/index.d.ts:1379 +packages/quickjs-emscripten-core/dist/index.d.ts:1426 ## Properties @@ -60,7 +60,7 @@ quickjs-emscripten-core/dist/index.d.ts:1379 #### Source -quickjs-emscripten-core/dist/index.d.ts:1377 +packages/quickjs-emscripten-core/dist/index.d.ts:1424 *** @@ -70,7 +70,7 @@ quickjs-emscripten-core/dist/index.d.ts:1377 #### Source -quickjs-emscripten-core/dist/index.d.ts:1378 +packages/quickjs-emscripten-core/dist/index.d.ts:1425 ## Methods @@ -84,7 +84,7 @@ quickjs-emscripten-core/dist/index.d.ts:1378 #### Source -quickjs-emscripten-core/dist/index.d.ts:1384 +packages/quickjs-emscripten-core/dist/index.d.ts:1431 *** @@ -98,7 +98,7 @@ quickjs-emscripten-core/dist/index.d.ts:1384 #### Source -quickjs-emscripten-core/dist/index.d.ts:1383 +packages/quickjs-emscripten-core/dist/index.d.ts:1430 *** @@ -122,7 +122,7 @@ quickjs-emscripten-core/dist/index.d.ts:1383 #### Source -quickjs-emscripten-core/dist/index.d.ts:1382 +packages/quickjs-emscripten-core/dist/index.d.ts:1429 *** @@ -144,7 +144,7 @@ quickjs-emscripten-core/dist/index.d.ts:1382 #### Source -quickjs-emscripten-core/dist/index.d.ts:1381 +packages/quickjs-emscripten-core/dist/index.d.ts:1428 *** @@ -166,7 +166,7 @@ quickjs-emscripten-core/dist/index.d.ts:1381 #### Source -quickjs-emscripten-core/dist/index.d.ts:1380 +packages/quickjs-emscripten-core/dist/index.d.ts:1427 *** diff --git a/doc/quickjs-emscripten/classes/WeakLifetime.md b/doc/quickjs-emscripten/classes/WeakLifetime.md index 423f8c66..90bd3d4c 100644 --- a/doc/quickjs-emscripten/classes/WeakLifetime.md +++ b/doc/quickjs-emscripten/classes/WeakLifetime.md @@ -73,7 +73,7 @@ Used for function arguments. #### Source -quickjs-emscripten-core/dist/index.d.ts:565 +packages/quickjs-emscripten-core/dist/index.d.ts:565 ## Properties @@ -87,7 +87,7 @@ quickjs-emscripten-core/dist/index.d.ts:565 #### Source -quickjs-emscripten-core/dist/index.d.ts:511 +packages/quickjs-emscripten-core/dist/index.d.ts:511 *** @@ -101,7 +101,7 @@ quickjs-emscripten-core/dist/index.d.ts:511 #### Source -quickjs-emscripten-core/dist/index.d.ts:512 +packages/quickjs-emscripten-core/dist/index.d.ts:512 *** @@ -115,7 +115,7 @@ quickjs-emscripten-core/dist/index.d.ts:512 #### Source -quickjs-emscripten-core/dist/index.d.ts:510 +packages/quickjs-emscripten-core/dist/index.d.ts:510 *** @@ -129,7 +129,7 @@ quickjs-emscripten-core/dist/index.d.ts:510 #### Source -quickjs-emscripten-core/dist/index.d.ts:507 +packages/quickjs-emscripten-core/dist/index.d.ts:507 *** @@ -151,7 +151,7 @@ quickjs-emscripten-core/dist/index.d.ts:507 #### Source -quickjs-emscripten-core/dist/index.d.ts:508 +packages/quickjs-emscripten-core/dist/index.d.ts:508 *** @@ -173,7 +173,7 @@ quickjs-emscripten-core/dist/index.d.ts:508 #### Source -quickjs-emscripten-core/dist/index.d.ts:509 +packages/quickjs-emscripten-core/dist/index.d.ts:509 ## Accessors @@ -191,7 +191,7 @@ false after the object has been [dispose](WeakLifetime.md#dispose)d #### Source -quickjs-emscripten-core/dist/index.d.ts:522 +packages/quickjs-emscripten-core/dist/index.d.ts:522 *** @@ -205,7 +205,7 @@ quickjs-emscripten-core/dist/index.d.ts:522 #### Source -quickjs-emscripten-core/dist/index.d.ts:531 +packages/quickjs-emscripten-core/dist/index.d.ts:531 *** @@ -219,7 +219,7 @@ quickjs-emscripten-core/dist/index.d.ts:531 #### Source -quickjs-emscripten-core/dist/index.d.ts:530 +packages/quickjs-emscripten-core/dist/index.d.ts:530 *** @@ -240,7 +240,7 @@ If the lifetime has been [dispose](WeakLifetime.md#dispose)d already. #### Source -quickjs-emscripten-core/dist/index.d.ts:529 +packages/quickjs-emscripten-core/dist/index.d.ts:529 ## Methods @@ -272,7 +272,7 @@ the result of `map(this)`. ##### Source -quickjs-emscripten-core/dist/index.d.ts:540 +packages/quickjs-emscripten-core/dist/index.d.ts:540 #### consume(map) @@ -296,7 +296,7 @@ quickjs-emscripten-core/dist/index.d.ts:540 ##### Source -quickjs-emscripten-core/dist/index.d.ts:541 +packages/quickjs-emscripten-core/dist/index.d.ts:541 *** @@ -316,7 +316,7 @@ Dispose of [value](WeakLifetime.md#value-1) and perform cleanup. #### Source -quickjs-emscripten-core/dist/index.d.ts:566 +packages/quickjs-emscripten-core/dist/index.d.ts:566 *** @@ -336,7 +336,7 @@ Create a new handle pointing to the same [value](WeakLifetime.md#value-1). #### Source -quickjs-emscripten-core/dist/index.d.ts:535 +packages/quickjs-emscripten-core/dist/index.d.ts:535 *** diff --git a/doc/quickjs-emscripten/exports.md b/doc/quickjs-emscripten/exports.md index c11873d0..7c826320 100644 --- a/doc/quickjs-emscripten/exports.md +++ b/doc/quickjs-emscripten/exports.md @@ -36,6 +36,7 @@ - [JSValuePointer](exports.md#jsvaluepointer) - [JSValuePointerPointer](exports.md#jsvaluepointerpointer) - [JSVoidPointer](exports.md#jsvoidpointer) + - [OrLoader\](exports.md#orloadert) - [OwnedHeapCharPointer](exports.md#ownedheapcharpointer) - [PromiseExecutor\](exports.md#promiseexecutorresolvet-rejectt) - [PromisedDefault\](exports.md#promiseddefaultt) @@ -72,6 +73,7 @@ - [newQuickJSAsyncWASMModuleFromVariant()](exports.md#newquickjsasyncwasmmodulefromvariant) - [newQuickJSWASMModule()](exports.md#newquickjswasmmodule) - [newQuickJSWASMModuleFromVariant()](exports.md#newquickjswasmmodulefromvariant) + - [newVariant()](exports.md#newvariant) - [shouldInterruptAfterDeadline()](exports.md#shouldinterruptafterdeadline) ## Namespaces @@ -98,9 +100,11 @@ - [AsyncRuntimeOptions](interfaces/AsyncRuntimeOptions.md) - [ContextEvalOptions](interfaces/ContextEvalOptions.md) - [ContextOptions](interfaces/ContextOptions.md) +- [CustomizeVariantOptions](interfaces/CustomizeVariantOptions.md) - [Disposable](interfaces/Disposable.md) - [EmscriptenModule](interfaces/EmscriptenModule.md) - [EmscriptenModuleLoader](interfaces/EmscriptenModuleLoader.md) +- [EmscriptenModuleLoaderOptions](interfaces/EmscriptenModuleLoaderOptions.md) - [JSModuleLoader](interfaces/JSModuleLoader.md) - [JSModuleLoaderAsync](interfaces/JSModuleLoaderAsync.md) - [JSModuleNormalizer](interfaces/JSModuleNormalizer.md) @@ -115,6 +119,7 @@ - [QuickJSSyncVariant](interfaces/QuickJSSyncVariant.md) - [RuntimeOptions](interfaces/RuntimeOptions.md) - [RuntimeOptionsBase](interfaces/RuntimeOptionsBase.md) +- [SourceMapData](interfaces/SourceMapData.md) - [VmPropertyDescriptor](interfaces/VmPropertyDescriptor.md) ## Type Aliases @@ -135,7 +140,7 @@ #### Source -quickjs-emscripten-core/dist/index.d.ts:310 +packages/quickjs-emscripten-core/dist/index.d.ts:310 *** @@ -148,7 +153,7 @@ for the Emscripten stack. #### Source -quickjs-ffi-types/dist/index.d.ts:66 +packages/quickjs-ffi-types/dist/index.d.ts:66 *** @@ -158,7 +163,7 @@ quickjs-ffi-types/dist/index.d.ts:66 #### Source -quickjs-ffi-types/dist/index.d.ts:392 +packages/quickjs-ffi-types/dist/index.d.ts:455 *** @@ -168,7 +173,7 @@ quickjs-ffi-types/dist/index.d.ts:392 #### Source -quickjs-ffi-types/dist/index.d.ts:206 +packages/quickjs-ffi-types/dist/index.d.ts:269 *** @@ -184,7 +189,7 @@ by the runtime. #### Source -quickjs-emscripten-core/dist/index.d.ts:119 +packages/quickjs-emscripten-core/dist/index.d.ts:119 *** @@ -209,7 +214,7 @@ Determines if a VM's execution should be interrupted. #### Source -quickjs-emscripten-core/dist/index.d.ts:112 +packages/quickjs-emscripten-core/dist/index.d.ts:112 *** @@ -222,7 +227,7 @@ for the Emscripten stack. #### Source -quickjs-ffi-types/dist/index.d.ts:76 +packages/quickjs-ffi-types/dist/index.d.ts:76 *** @@ -234,7 +239,7 @@ quickjs-ffi-types/dist/index.d.ts:76 #### Source -quickjs-ffi-types/dist/index.d.ts:20 +packages/quickjs-ffi-types/dist/index.d.ts:20 *** @@ -246,7 +251,7 @@ quickjs-ffi-types/dist/index.d.ts:20 #### Source -quickjs-ffi-types/dist/index.d.ts:24 +packages/quickjs-ffi-types/dist/index.d.ts:24 *** @@ -258,7 +263,7 @@ quickjs-ffi-types/dist/index.d.ts:24 #### Source -quickjs-ffi-types/dist/index.d.ts:28 +packages/quickjs-ffi-types/dist/index.d.ts:28 *** @@ -268,7 +273,7 @@ quickjs-ffi-types/dist/index.d.ts:28 #### Source -quickjs-emscripten-core/dist/index.d.ts:391 +packages/quickjs-emscripten-core/dist/index.d.ts:391 *** @@ -278,7 +283,7 @@ quickjs-emscripten-core/dist/index.d.ts:391 #### Source -quickjs-emscripten-core/dist/index.d.ts:392 +packages/quickjs-emscripten-core/dist/index.d.ts:392 *** @@ -288,7 +293,7 @@ quickjs-emscripten-core/dist/index.d.ts:392 #### Source -quickjs-emscripten-core/dist/index.d.ts:390 +packages/quickjs-emscripten-core/dist/index.d.ts:390 *** @@ -298,7 +303,7 @@ quickjs-emscripten-core/dist/index.d.ts:390 #### Source -quickjs-emscripten-core/dist/index.d.ts:402 +packages/quickjs-emscripten-core/dist/index.d.ts:402 *** @@ -308,7 +313,7 @@ quickjs-emscripten-core/dist/index.d.ts:402 #### Source -quickjs-emscripten-core/dist/index.d.ts:403 +packages/quickjs-emscripten-core/dist/index.d.ts:403 *** @@ -318,7 +323,7 @@ quickjs-emscripten-core/dist/index.d.ts:403 #### Source -quickjs-emscripten-core/dist/index.d.ts:401 +packages/quickjs-emscripten-core/dist/index.d.ts:401 *** @@ -330,7 +335,7 @@ quickjs-emscripten-core/dist/index.d.ts:401 #### Source -quickjs-ffi-types/dist/index.d.ts:16 +packages/quickjs-ffi-types/dist/index.d.ts:16 *** @@ -354,7 +359,7 @@ You can do so from Javascript by calling the .dispose() method. #### Source -quickjs-emscripten-core/dist/index.d.ts:381 +packages/quickjs-emscripten-core/dist/index.d.ts:381 *** @@ -373,7 +378,7 @@ quickjs-emscripten takes care of disposing JSValueConst references. #### Source -quickjs-emscripten-core/dist/index.d.ts:365 +packages/quickjs-emscripten-core/dist/index.d.ts:365 *** @@ -386,7 +391,7 @@ See [JSValueConst](exports.md#jsvalueconst) and [StaticJSValue](exports.md#stati #### Source -quickjs-ffi-types/dist/index.d.ts:38 +packages/quickjs-ffi-types/dist/index.d.ts:38 *** @@ -398,7 +403,7 @@ Used internally for Javascript-to-C function calls. #### Source -quickjs-ffi-types/dist/index.d.ts:46 +packages/quickjs-ffi-types/dist/index.d.ts:46 *** @@ -411,7 +416,7 @@ See [JSValue](exports.md#jsvalue). #### Source -quickjs-ffi-types/dist/index.d.ts:33 +packages/quickjs-ffi-types/dist/index.d.ts:33 *** @@ -423,7 +428,7 @@ Used internally for Javascript-to-C function calls. #### Source -quickjs-ffi-types/dist/index.d.ts:42 +packages/quickjs-ffi-types/dist/index.d.ts:42 *** @@ -435,7 +440,21 @@ Opaque pointer that was allocated by js_malloc. #### Source -quickjs-ffi-types/dist/index.d.ts:80 +packages/quickjs-ffi-types/dist/index.d.ts:80 + +*** + +### OrLoader\ + +> **OrLoader**\<`T`\>: `T` \| () => `Promise`\<`T`\> + +#### Type parameters + +• **T** + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1310 *** @@ -448,7 +467,7 @@ for the Emscripten stack. #### Source -quickjs-ffi-types/dist/index.d.ts:71 +packages/quickjs-ffi-types/dist/index.d.ts:71 *** @@ -474,7 +493,7 @@ quickjs-ffi-types/dist/index.d.ts:71 #### Source -quickjs-emscripten-core/dist/index.d.ts:482 +packages/quickjs-emscripten-core/dist/index.d.ts:482 *** @@ -488,7 +507,7 @@ quickjs-emscripten-core/dist/index.d.ts:482 #### Source -quickjs-emscripten-core/dist/index.d.ts:1251 +packages/quickjs-emscripten-core/dist/index.d.ts:1251 *** @@ -500,7 +519,7 @@ Used internally for C-to-Javascript function calls. #### Source -quickjs-ffi-types/dist/index.d.ts:53 +packages/quickjs-ffi-types/dist/index.d.ts:53 *** @@ -512,7 +531,7 @@ Used internally for C-to-Javascript interrupt handlers. #### Source -quickjs-ffi-types/dist/index.d.ts:57 +packages/quickjs-ffi-types/dist/index.d.ts:57 *** @@ -524,7 +543,7 @@ Used internally for C-to-Javascript module loading. #### Source -quickjs-ffi-types/dist/index.d.ts:61 +packages/quickjs-ffi-types/dist/index.d.ts:61 *** @@ -540,7 +559,7 @@ You must dispose of any handles you create by calling the `.dispose()` method. #### Source -quickjs-emscripten-core/dist/index.d.ts:389 +packages/quickjs-emscripten-core/dist/index.d.ts:389 *** @@ -553,7 +572,7 @@ Property key for getting or setting a property on a handle with #### Source -quickjs-emscripten-core/dist/index.d.ts:672 +packages/quickjs-emscripten-core/dist/index.d.ts:672 *** @@ -563,7 +582,7 @@ quickjs-emscripten-core/dist/index.d.ts:672 #### Source -quickjs-ffi-types/dist/index.d.ts:391 +packages/quickjs-ffi-types/dist/index.d.ts:454 *** @@ -576,7 +595,7 @@ be disposed. #### Source -quickjs-emscripten-core/dist/index.d.ts:354 +packages/quickjs-emscripten-core/dist/index.d.ts:354 *** @@ -595,7 +614,7 @@ Used as an optional. #### Source -quickjs-emscripten-core/dist/index.d.ts:17 +packages/quickjs-emscripten-core/dist/index.d.ts:17 *** @@ -612,7 +631,7 @@ Used as an optional for results of a Vm call. #### Source -quickjs-emscripten-core/dist/index.d.ts:33 +packages/quickjs-emscripten-core/dist/index.d.ts:33 *** @@ -647,7 +666,7 @@ It should not retain a reference to its return value or thrown error. #### Source -quickjs-emscripten-core/dist/index.d.ts:46 +packages/quickjs-emscripten-core/dist/index.d.ts:46 ## Variables @@ -665,11 +684,11 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source -variant-quickjs-wasmfile-debug-asyncify/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-debug-asyncify/dist/index.d.ts:17 *** @@ -687,11 +706,11 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | 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 | sync | The default, normal build. Note that both variants support regular async functions. | | 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source -variant-quickjs-wasmfile-debug-sync/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-debug-sync/dist/index.d.ts:17 *** @@ -759,7 +778,7 @@ module code #### Source -quickjs-ffi-types/dist/index.d.ts:89 +packages/quickjs-ffi-types/dist/index.d.ts:89 *** @@ -777,11 +796,11 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | releaseMode | release | Optimized for performance; use when building/deploying your application. | | 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source -variant-quickjs-wasmfile-release-asyncify/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-release-asyncify/dist/index.d.ts:17 *** @@ -799,11 +818,11 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | releaseMode | release | Optimized for performance; use when building/deploying your application. | | syncMode | sync | The default, normal build. Note that both variants support regular async functions. | | 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 | Has these package.json export conditions | +| exports | require import browser workerd | Has these package.json export conditions | #### Source -variant-quickjs-wasmfile-release-sync/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-release-sync/dist/index.d.ts:17 ## Functions @@ -836,7 +855,7 @@ variant-quickjs-wasmfile-release-sync/dist/index.d.ts:17 #### Source -quickjs-ffi-types/dist/index.d.ts:85 +packages/quickjs-ffi-types/dist/index.d.ts:85 *** @@ -864,7 +883,7 @@ To work with the asyncified version of this library, see these functions: #### Source -[quickjs-emscripten/src/mod.ts:28](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L28) +[packages/quickjs-emscripten/src/mod.ts:28](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L28) *** @@ -885,7 +904,7 @@ If called before `getQuickJS` resolves. #### Source -[quickjs-emscripten/src/mod.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L41) +[packages/quickjs-emscripten/src/mod.ts:41](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L41) *** @@ -909,7 +928,7 @@ If called before `getQuickJS` resolves. #### Source -quickjs-emscripten-core/dist/index.d.ts:26 +packages/quickjs-emscripten-core/dist/index.d.ts:26 *** @@ -933,7 +952,7 @@ quickjs-emscripten-core/dist/index.d.ts:26 #### Source -quickjs-emscripten-core/dist/index.d.ts:23 +packages/quickjs-emscripten-core/dist/index.d.ts:23 *** @@ -965,7 +984,7 @@ const getDebugModule = memoizePromiseFactory(() => newQuickJSWASMModule(DEBUG_SY #### Source -quickjs-emscripten-core/dist/index.d.ts:1309 +packages/quickjs-emscripten-core/dist/index.d.ts:1309 *** @@ -994,7 +1013,7 @@ https://bugs.chromium.org/p/v8/issues/detail?id=12076 #### Source -[quickjs-emscripten/src/mod.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L76) +[packages/quickjs-emscripten/src/mod.ts:76](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L76) *** @@ -1022,7 +1041,7 @@ https://bugs.chromium.org/p/v8/issues/detail?id=12076 #### Source -[quickjs-emscripten/src/mod.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L59) +[packages/quickjs-emscripten/src/mod.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/mod.ts#L59) *** @@ -1054,7 +1073,7 @@ Optionally, pass a [QuickJSAsyncVariant](interfaces/QuickJSAsyncVariant.md) to c #### Source -[quickjs-emscripten/src/variants.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/variants.ts#L46) +[packages/quickjs-emscripten/src/variants.ts:46](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/variants.ts#L46) *** @@ -1094,7 +1113,7 @@ const quickjs = new newQuickJSAsyncWASMModuleFromVariant( #### Source -quickjs-emscripten-core/dist/index.d.ts:1298 +packages/quickjs-emscripten-core/dist/index.d.ts:1298 *** @@ -1121,7 +1140,7 @@ Optionally, pass a [QuickJSSyncVariant](interfaces/QuickJSSyncVariant.md) to con #### Source -[quickjs-emscripten/src/variants.ts:24](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/variants.ts#L24) +[packages/quickjs-emscripten/src/variants.ts:24](https://github.com/justjake/quickjs-emscripten/blob/main/packages/quickjs-emscripten/src/variants.ts#L24) *** @@ -1156,7 +1175,34 @@ const quickjs = new newQuickJSWASMModuleFromVariant( #### Source -quickjs-emscripten-core/dist/index.d.ts:1273 +packages/quickjs-emscripten-core/dist/index.d.ts:1273 + +*** + +### newVariant() + +> **newVariant**\<`T`\>(`baseVariant`, `options`): `T` + +Create a new variant by overriding how Emscripten obtains the WebAssembly module. +This may be necessary in Cloudflare Workers, which can't compile WebAssembly modules from binary data. + +#### Type parameters + +• **T** extends [`QuickJSVariant`](exports.md#quickjsvariant) + +#### Parameters + +• **baseVariant**: `T` + +• **options**: [`CustomizeVariantOptions`](interfaces/CustomizeVariantOptions.md) + +#### Returns + +`T` + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1351 *** @@ -1179,7 +1225,7 @@ Interrupt execution if it's still running after this time. #### Source -quickjs-emscripten-core/dist/index.d.ts:1317 +packages/quickjs-emscripten-core/dist/index.d.ts:1359 *** diff --git a/doc/quickjs-emscripten/interfaces/AsyncRuntimeOptions.md b/doc/quickjs-emscripten/interfaces/AsyncRuntimeOptions.md index 0a420fc7..3c7b7577 100644 --- a/doc/quickjs-emscripten/interfaces/AsyncRuntimeOptions.md +++ b/doc/quickjs-emscripten/interfaces/AsyncRuntimeOptions.md @@ -35,7 +35,7 @@ #### Source -quickjs-emscripten-core/dist/index.d.ts:421 +packages/quickjs-emscripten-core/dist/index.d.ts:421 *** @@ -49,7 +49,7 @@ quickjs-emscripten-core/dist/index.d.ts:421 #### Source -quickjs-emscripten-core/dist/index.d.ts:416 +packages/quickjs-emscripten-core/dist/index.d.ts:416 *** @@ -63,7 +63,7 @@ quickjs-emscripten-core/dist/index.d.ts:416 #### Source -quickjs-emscripten-core/dist/index.d.ts:417 +packages/quickjs-emscripten-core/dist/index.d.ts:417 *** @@ -77,7 +77,7 @@ quickjs-emscripten-core/dist/index.d.ts:417 #### Source -quickjs-emscripten-core/dist/index.d.ts:418 +packages/quickjs-emscripten-core/dist/index.d.ts:418 *** @@ -87,7 +87,7 @@ quickjs-emscripten-core/dist/index.d.ts:418 #### Source -quickjs-emscripten-core/dist/index.d.ts:438 +packages/quickjs-emscripten-core/dist/index.d.ts:438 *** @@ -101,7 +101,7 @@ quickjs-emscripten-core/dist/index.d.ts:438 #### Source -quickjs-emscripten-core/dist/index.d.ts:419 +packages/quickjs-emscripten-core/dist/index.d.ts:419 *** @@ -115,7 +115,7 @@ quickjs-emscripten-core/dist/index.d.ts:419 #### Source -quickjs-emscripten-core/dist/index.d.ts:420 +packages/quickjs-emscripten-core/dist/index.d.ts:420 *** @@ -129,7 +129,7 @@ quickjs-emscripten-core/dist/index.d.ts:420 #### Source -quickjs-emscripten-core/dist/index.d.ts:422 +packages/quickjs-emscripten-core/dist/index.d.ts:422 *** diff --git a/doc/quickjs-emscripten/interfaces/ContextEvalOptions.md b/doc/quickjs-emscripten/interfaces/ContextEvalOptions.md index 4931cc80..8e793ddd 100644 --- a/doc/quickjs-emscripten/interfaces/ContextEvalOptions.md +++ b/doc/quickjs-emscripten/interfaces/ContextEvalOptions.md @@ -25,7 +25,7 @@ don't include the stack frames before this eval in the Error() backtraces #### Source -quickjs-emscripten-core/dist/index.d.ts:480 +packages/quickjs-emscripten-core/dist/index.d.ts:480 *** @@ -39,7 +39,7 @@ with JS_EvalFunction(). #### Source -quickjs-emscripten-core/dist/index.d.ts:478 +packages/quickjs-emscripten-core/dist/index.d.ts:478 *** @@ -51,7 +51,7 @@ Force "strict" mode #### Source -quickjs-emscripten-core/dist/index.d.ts:470 +packages/quickjs-emscripten-core/dist/index.d.ts:470 *** @@ -63,7 +63,7 @@ Force "strip" mode #### Source -quickjs-emscripten-core/dist/index.d.ts:472 +packages/quickjs-emscripten-core/dist/index.d.ts:472 *** @@ -75,7 +75,7 @@ Global code (default) #### Source -quickjs-emscripten-core/dist/index.d.ts:468 +packages/quickjs-emscripten-core/dist/index.d.ts:468 *** diff --git a/doc/quickjs-emscripten/interfaces/ContextOptions.md b/doc/quickjs-emscripten/interfaces/ContextOptions.md index 17c94a5f..049bd174 100644 --- a/doc/quickjs-emscripten/interfaces/ContextOptions.md +++ b/doc/quickjs-emscripten/interfaces/ContextOptions.md @@ -23,7 +23,7 @@ To omit all intrinsics, pass an empty array. #### Source -quickjs-emscripten-core/dist/index.d.ts:454 +packages/quickjs-emscripten-core/dist/index.d.ts:454 *** diff --git a/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md b/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md new file mode 100644 index 00000000..a01ccc0a --- /dev/null +++ b/doc/quickjs-emscripten/interfaces/CustomizeVariantOptions.md @@ -0,0 +1,167 @@ +[quickjs-emscripten](../../packages.md) • **quickjs-emscripten** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../packages.md) / [quickjs-emscripten](../exports.md) / CustomizeVariantOptions + +# Interface: CustomizeVariantOptions + +## Contents + +- [Properties](CustomizeVariantOptions.md#properties) + - [emscriptenModule?](CustomizeVariantOptions.md#emscriptenmodule) + - [locateFile?](CustomizeVariantOptions.md#locatefile) + - [log?](CustomizeVariantOptions.md#log) + - [wasmBinary?](CustomizeVariantOptions.md#wasmbinary) + - [wasmLocation?](CustomizeVariantOptions.md#wasmlocation) + - [wasmModule?](CustomizeVariantOptions.md#wasmmodule) + - [wasmSourceMapData?](CustomizeVariantOptions.md#wasmsourcemapdata) + - [wasmSourceMapLocation?](CustomizeVariantOptions.md#wasmsourcemaplocation) + +## Properties + +### emscriptenModule? + +> **emscriptenModule**?: [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) + +The enumerable properties of this object will be passed verbatim, although they may be overwritten if you pass other options. + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1343 + +*** + +### locateFile? + +> **locateFile**?: (`fileName`, `prefix`) => `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1341 + +*** + +### log? + +> **log**?: (...`data`) => `void`(`message`?, ...`optionalParams`) => `void` + +Debug logger + +#### Parameters + +• ...**data**: `any`[] + +#### Returns + +`void` + +Debug logger + +#### Parameters + +• **message?**: `any` + +• ...**optionalParams?**: `any`[] + +#### Returns + +`void` + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1345 + +*** + +### wasmBinary? + +> **wasmBinary**?: [`OrLoader`](../exports.md#orloadert)\<`ArrayBuffer`\> + +If given, Emscripten will compile the WebAssembly.Module from these bytes. + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1315 + +*** + +### wasmLocation? + +> **wasmLocation**?: `string` + +If given, Emscripten will try to load the WebAssembly module data from this location (path or URI) as appropriate for the current platform. + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1313 + +*** + +### wasmModule? + +> **wasmModule**?: [`OrLoader`](../exports.md#orloadert)\<`Module`\> + +If given, Emscripten will instantiate the WebAssembly.Instance from this existing WebAssembly.Module + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1317 + +*** + +### wasmSourceMapData? + +> **wasmSourceMapData**?: [`OrLoader`](../exports.md#orloadert)\<`string` \| [`SourceMapData`](SourceMapData.md)\> + +If given, we will provide the source map to Emscripten directly. This may only be respected if wasmModule is also provided. + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1321 + +*** + +### wasmSourceMapLocation? + +> **wasmSourceMapLocation**?: `string` + +If given, Emscripten will try to load the source map for the WebAssembly module from this location (path or URI) as appropriate for the current platform. + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1319 + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/quickjs-emscripten/interfaces/Disposable.md b/doc/quickjs-emscripten/interfaces/Disposable.md index ec216103..d2989b31 100644 --- a/doc/quickjs-emscripten/interfaces/Disposable.md +++ b/doc/quickjs-emscripten/interfaces/Disposable.md @@ -25,7 +25,7 @@ Use [Scope](../classes/Scope.md) to manage cleaning up multiple disposables. #### Source -quickjs-emscripten-core/dist/index.d.ts:498 +packages/quickjs-emscripten-core/dist/index.d.ts:498 ## Methods @@ -41,7 +41,7 @@ Dispose of the underlying resources used by this object. #### Source -quickjs-emscripten-core/dist/index.d.ts:493 +packages/quickjs-emscripten-core/dist/index.d.ts:493 *** diff --git a/doc/quickjs-emscripten/interfaces/EmscriptenModule.md b/doc/quickjs-emscripten/interfaces/EmscriptenModule.md index 907f6acc..4f93f1d5 100644 --- a/doc/quickjs-emscripten/interfaces/EmscriptenModule.md +++ b/doc/quickjs-emscripten/interfaces/EmscriptenModule.md @@ -11,7 +11,7 @@ QuickJS. ## Contents -- [Extended By](EmscriptenModule.md#extended-by) +- [Extends](EmscriptenModule.md#extends) - [Properties](EmscriptenModule.md#properties) - [FAST\_MEMORY](EmscriptenModule.md#fast-memory) - [HEAP16](EmscriptenModule.md#heap16) @@ -24,18 +24,21 @@ QuickJS. - [HEAPU8](EmscriptenModule.md#heapu8) - [TOTAL\_MEMORY](EmscriptenModule.md#total-memory) - [TOTAL\_STACK](EmscriptenModule.md#total-stack) + - [wasmBinary?](EmscriptenModule.md#wasmbinary) - [Methods](EmscriptenModule.md#methods) - [UTF8ToString()](EmscriptenModule.md#utf8tostring) - [\_free()](EmscriptenModule.md#free) - [\_malloc()](EmscriptenModule.md#malloc) - [cwrap()](EmscriptenModule.md#cwrap) + - [instantiateWasm()?](EmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](EmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](EmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](EmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](EmscriptenModule.md#stringtoutf8) -## Extended By +## Extends -- [`QuickJSAsyncEmscriptenModule`](QuickJSAsyncEmscriptenModule.md) -- [`QuickJSEmscriptenModule`](QuickJSEmscriptenModule.md) +- [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) ## Properties @@ -45,7 +48,7 @@ QuickJS. #### Source -quickjs-ffi-types/dist/index.d.ts:163 +packages/quickjs-ffi-types/dist/index.d.ts:226 *** @@ -55,7 +58,7 @@ quickjs-ffi-types/dist/index.d.ts:163 #### Source -quickjs-ffi-types/dist/index.d.ts:154 +packages/quickjs-ffi-types/dist/index.d.ts:217 *** @@ -65,7 +68,7 @@ quickjs-ffi-types/dist/index.d.ts:154 #### Source -quickjs-ffi-types/dist/index.d.ts:155 +packages/quickjs-ffi-types/dist/index.d.ts:218 *** @@ -75,7 +78,7 @@ quickjs-ffi-types/dist/index.d.ts:155 #### Source -quickjs-ffi-types/dist/index.d.ts:153 +packages/quickjs-ffi-types/dist/index.d.ts:216 *** @@ -85,7 +88,7 @@ quickjs-ffi-types/dist/index.d.ts:153 #### Source -quickjs-ffi-types/dist/index.d.ts:159 +packages/quickjs-ffi-types/dist/index.d.ts:222 *** @@ -95,7 +98,7 @@ quickjs-ffi-types/dist/index.d.ts:159 #### Source -quickjs-ffi-types/dist/index.d.ts:160 +packages/quickjs-ffi-types/dist/index.d.ts:223 *** @@ -105,7 +108,7 @@ quickjs-ffi-types/dist/index.d.ts:160 #### Source -quickjs-ffi-types/dist/index.d.ts:157 +packages/quickjs-ffi-types/dist/index.d.ts:220 *** @@ -115,7 +118,7 @@ quickjs-ffi-types/dist/index.d.ts:157 #### Source -quickjs-ffi-types/dist/index.d.ts:158 +packages/quickjs-ffi-types/dist/index.d.ts:221 *** @@ -125,7 +128,7 @@ quickjs-ffi-types/dist/index.d.ts:158 #### Source -quickjs-ffi-types/dist/index.d.ts:156 +packages/quickjs-ffi-types/dist/index.d.ts:219 *** @@ -135,7 +138,7 @@ quickjs-ffi-types/dist/index.d.ts:156 #### Source -quickjs-ffi-types/dist/index.d.ts:162 +packages/quickjs-ffi-types/dist/index.d.ts:225 *** @@ -145,7 +148,23 @@ quickjs-ffi-types/dist/index.d.ts:162 #### Source -quickjs-ffi-types/dist/index.d.ts:161 +packages/quickjs-ffi-types/dist/index.d.ts:224 + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModuleLoaderOptions.wasmBinary`](EmscriptenModuleLoaderOptions.md#wasmbinary) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 ## Methods @@ -168,7 +187,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -quickjs-ffi-types/dist/index.d.ts:148 +packages/quickjs-ffi-types/dist/index.d.ts:211 *** @@ -186,7 +205,7 @@ quickjs-ffi-types/dist/index.d.ts:148 #### Source -quickjs-ffi-types/dist/index.d.ts:151 +packages/quickjs-ffi-types/dist/index.d.ts:214 *** @@ -204,7 +223,7 @@ quickjs-ffi-types/dist/index.d.ts:151 #### Source -quickjs-ffi-types/dist/index.d.ts:150 +packages/quickjs-ffi-types/dist/index.d.ts:213 *** @@ -237,7 +256,33 @@ quickjs-ffi-types/dist/index.d.ts:150 #### Source -quickjs-ffi-types/dist/index.d.ts:152 +packages/quickjs-ffi-types/dist/index.d.ts:215 + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModuleLoaderOptions.instantiateWasm`](EmscriptenModuleLoaderOptions.md#instantiatewasm) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 *** @@ -255,7 +300,75 @@ quickjs-ffi-types/dist/index.d.ts:152 #### Source -quickjs-ffi-types/dist/index.d.ts:149 +packages/quickjs-ffi-types/dist/index.d.ts:212 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModuleLoaderOptions.locateFile`](EmscriptenModuleLoaderOptions.md#locatefile) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModuleLoaderOptions.monitorRunDependencies`](EmscriptenModuleLoaderOptions.md#monitorrundependencies) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 *** @@ -280,7 +393,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -quickjs-ffi-types/dist/index.d.ts:143 +packages/quickjs-ffi-types/dist/index.d.ts:206 *** diff --git a/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md index 401679f6..74c82cbd 100644 --- a/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md +++ b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoader.md @@ -10,7 +10,11 @@ • **T** extends [`EmscriptenModule`](EmscriptenModule.md) -> **EmscriptenModuleLoader**(): `Promise`\<`T`\> +> **EmscriptenModuleLoader**(`options`?): `Promise`\<`T`\> + +## Parameters + +• **options?**: [`EmscriptenModuleLoaderOptions`](EmscriptenModuleLoaderOptions.md) ## Returns @@ -18,7 +22,7 @@ ## Source -quickjs-ffi-types/dist/index.d.ts:208 +packages/quickjs-ffi-types/dist/index.d.ts:271 *** diff --git a/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoaderOptions.md b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoaderOptions.md new file mode 100644 index 00000000..f5ce9a23 --- /dev/null +++ b/doc/quickjs-emscripten/interfaces/EmscriptenModuleLoaderOptions.md @@ -0,0 +1,123 @@ +[quickjs-emscripten](../../packages.md) • **quickjs-emscripten** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../packages.md) / [quickjs-emscripten](../exports.md) / EmscriptenModuleLoaderOptions + +# Interface: EmscriptenModuleLoaderOptions + +This structure is defined by Emscripten. +It's possible to provide these parameters to an emscripten module loader. +See [the Emscripten Module API reference](https://emscripten.org/docs/api_reference/module.html). + +## Contents + +- [Extended By](EmscriptenModuleLoaderOptions.md#extended-by) +- [Properties](EmscriptenModuleLoaderOptions.md#properties) + - [wasmBinary?](EmscriptenModuleLoaderOptions.md#wasmbinary) +- [Methods](EmscriptenModuleLoaderOptions.md#methods) + - [instantiateWasm()?](EmscriptenModuleLoaderOptions.md#instantiatewasm) + - [locateFile()?](EmscriptenModuleLoaderOptions.md#locatefile) + - [monitorRunDependencies()?](EmscriptenModuleLoaderOptions.md#monitorrundependencies) + +## Extended By + +- [`EmscriptenModule`](EmscriptenModule.md) + +## Properties + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 + +## Methods + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/quickjs-emscripten/interfaces/JSModuleLoader.md b/doc/quickjs-emscripten/interfaces/JSModuleLoader.md index f6bbd3f5..bb924368 100644 --- a/doc/quickjs-emscripten/interfaces/JSModuleLoader.md +++ b/doc/quickjs-emscripten/interfaces/JSModuleLoader.md @@ -22,7 +22,7 @@ Load module (sync) ## Source -quickjs-emscripten-core/dist/index.d.ts:399 +packages/quickjs-emscripten-core/dist/index.d.ts:399 *** diff --git a/doc/quickjs-emscripten/interfaces/JSModuleLoaderAsync.md b/doc/quickjs-emscripten/interfaces/JSModuleLoaderAsync.md index c375ee23..ab6670fc 100644 --- a/doc/quickjs-emscripten/interfaces/JSModuleLoaderAsync.md +++ b/doc/quickjs-emscripten/interfaces/JSModuleLoaderAsync.md @@ -22,7 +22,7 @@ Load module (async) ## Source -quickjs-emscripten-core/dist/index.d.ts:395 +packages/quickjs-emscripten-core/dist/index.d.ts:395 *** diff --git a/doc/quickjs-emscripten/interfaces/JSModuleNormalizer.md b/doc/quickjs-emscripten/interfaces/JSModuleNormalizer.md index f799e923..c458d165 100644 --- a/doc/quickjs-emscripten/interfaces/JSModuleNormalizer.md +++ b/doc/quickjs-emscripten/interfaces/JSModuleNormalizer.md @@ -26,7 +26,7 @@ ## Source -quickjs-emscripten-core/dist/index.d.ts:408 +packages/quickjs-emscripten-core/dist/index.d.ts:408 > **JSModuleNormalizer**(`baseModuleName`, `requestedName`, `vm`): [`JSModuleNormalizeResult`](../exports.md#jsmodulenormalizeresult) \| `Promise`\<[`JSModuleNormalizeResult`](../exports.md#jsmodulenormalizeresult)\> @@ -44,7 +44,7 @@ quickjs-emscripten-core/dist/index.d.ts:408 ## Source -quickjs-emscripten-core/dist/index.d.ts:405 +packages/quickjs-emscripten-core/dist/index.d.ts:405 *** diff --git a/doc/quickjs-emscripten/interfaces/JSModuleNormalizerAsync.md b/doc/quickjs-emscripten/interfaces/JSModuleNormalizerAsync.md index f8835191..7af6a2ed 100644 --- a/doc/quickjs-emscripten/interfaces/JSModuleNormalizerAsync.md +++ b/doc/quickjs-emscripten/interfaces/JSModuleNormalizerAsync.md @@ -26,7 +26,7 @@ ## Source -quickjs-emscripten-core/dist/index.d.ts:405 +packages/quickjs-emscripten-core/dist/index.d.ts:405 *** diff --git a/doc/quickjs-emscripten/interfaces/LowLevelJavascriptVm.md b/doc/quickjs-emscripten/interfaces/LowLevelJavascriptVm.md index 111973f8..e88f21e9 100644 --- a/doc/quickjs-emscripten/interfaces/LowLevelJavascriptVm.md +++ b/doc/quickjs-emscripten/interfaces/LowLevelJavascriptVm.md @@ -45,7 +45,7 @@ From https://www.figma.com/blog/how-we-built-the-figma-plugin-system/ #### Source -quickjs-emscripten-core/dist/index.d.ts:56 +packages/quickjs-emscripten-core/dist/index.d.ts:56 *** @@ -55,7 +55,7 @@ quickjs-emscripten-core/dist/index.d.ts:56 #### Source -quickjs-emscripten-core/dist/index.d.ts:57 +packages/quickjs-emscripten-core/dist/index.d.ts:57 ## Methods @@ -77,7 +77,7 @@ quickjs-emscripten-core/dist/index.d.ts:57 #### Source -quickjs-emscripten-core/dist/index.d.ts:68 +packages/quickjs-emscripten-core/dist/index.d.ts:68 *** @@ -99,7 +99,7 @@ quickjs-emscripten-core/dist/index.d.ts:68 #### Source -quickjs-emscripten-core/dist/index.d.ts:67 +packages/quickjs-emscripten-core/dist/index.d.ts:67 *** @@ -119,7 +119,7 @@ quickjs-emscripten-core/dist/index.d.ts:67 #### Source -quickjs-emscripten-core/dist/index.d.ts:69 +packages/quickjs-emscripten-core/dist/index.d.ts:69 *** @@ -137,7 +137,7 @@ quickjs-emscripten-core/dist/index.d.ts:69 #### Source -quickjs-emscripten-core/dist/index.d.ts:59 +packages/quickjs-emscripten-core/dist/index.d.ts:59 *** @@ -157,7 +157,7 @@ quickjs-emscripten-core/dist/index.d.ts:59 #### Source -quickjs-emscripten-core/dist/index.d.ts:65 +packages/quickjs-emscripten-core/dist/index.d.ts:65 *** @@ -175,7 +175,7 @@ quickjs-emscripten-core/dist/index.d.ts:65 #### Source -quickjs-emscripten-core/dist/index.d.ts:60 +packages/quickjs-emscripten-core/dist/index.d.ts:60 *** @@ -195,7 +195,7 @@ quickjs-emscripten-core/dist/index.d.ts:60 #### Source -quickjs-emscripten-core/dist/index.d.ts:64 +packages/quickjs-emscripten-core/dist/index.d.ts:64 *** @@ -213,7 +213,7 @@ quickjs-emscripten-core/dist/index.d.ts:64 #### Source -quickjs-emscripten-core/dist/index.d.ts:61 +packages/quickjs-emscripten-core/dist/index.d.ts:61 *** @@ -231,7 +231,7 @@ quickjs-emscripten-core/dist/index.d.ts:61 #### Source -quickjs-emscripten-core/dist/index.d.ts:63 +packages/quickjs-emscripten-core/dist/index.d.ts:63 *** @@ -249,7 +249,7 @@ quickjs-emscripten-core/dist/index.d.ts:63 #### Source -quickjs-emscripten-core/dist/index.d.ts:62 +packages/quickjs-emscripten-core/dist/index.d.ts:62 *** @@ -271,7 +271,7 @@ quickjs-emscripten-core/dist/index.d.ts:62 #### Source -quickjs-emscripten-core/dist/index.d.ts:66 +packages/quickjs-emscripten-core/dist/index.d.ts:66 *** @@ -289,7 +289,7 @@ quickjs-emscripten-core/dist/index.d.ts:66 #### Source -quickjs-emscripten-core/dist/index.d.ts:58 +packages/quickjs-emscripten-core/dist/index.d.ts:58 *** diff --git a/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md b/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md index 3bc29250..06dbb75f 100644 --- a/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md +++ b/doc/quickjs-emscripten/interfaces/ModuleEvalOptions.md @@ -27,7 +27,7 @@ To remove the limit, set to `0`. #### Source -quickjs-emscripten-core/dist/index.d.ts:1102 +packages/quickjs-emscripten-core/dist/index.d.ts:1102 *** @@ -39,7 +39,7 @@ Memory limit, in bytes, of WebAssembly heap memory used by the QuickJS VM. #### Source -quickjs-emscripten-core/dist/index.d.ts:1097 +packages/quickjs-emscripten-core/dist/index.d.ts:1097 *** @@ -51,7 +51,7 @@ Module loader for any `import` statements or expressions. #### Source -quickjs-emscripten-core/dist/index.d.ts:1106 +packages/quickjs-emscripten-core/dist/index.d.ts:1106 *** @@ -64,7 +64,7 @@ See [shouldInterruptAfterDeadline](../exports.md#shouldinterruptafterdeadline). #### Source -quickjs-emscripten-core/dist/index.d.ts:1093 +packages/quickjs-emscripten-core/dist/index.d.ts:1093 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md b/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md index 30824894..9ceb21ea 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSAsyncEmscriptenModule.md @@ -26,12 +26,16 @@ QuickJS. - [TOTAL\_STACK](QuickJSAsyncEmscriptenModule.md#total-stack) - [callbacks](QuickJSAsyncEmscriptenModule.md#callbacks) - [type](QuickJSAsyncEmscriptenModule.md#type) + - [wasmBinary?](QuickJSAsyncEmscriptenModule.md#wasmbinary) - [Methods](QuickJSAsyncEmscriptenModule.md#methods) - [UTF8ToString()](QuickJSAsyncEmscriptenModule.md#utf8tostring) - [\_free()](QuickJSAsyncEmscriptenModule.md#free) - [\_malloc()](QuickJSAsyncEmscriptenModule.md#malloc) - [cwrap()](QuickJSAsyncEmscriptenModule.md#cwrap) + - [instantiateWasm()?](QuickJSAsyncEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSAsyncEmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](QuickJSAsyncEmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](QuickJSAsyncEmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](QuickJSAsyncEmscriptenModule.md#stringtoutf8) ## Extends @@ -50,7 +54,7 @@ QuickJS. #### Source -quickjs-ffi-types/dist/index.d.ts:163 +packages/quickjs-ffi-types/dist/index.d.ts:226 *** @@ -64,7 +68,7 @@ quickjs-ffi-types/dist/index.d.ts:163 #### Source -quickjs-ffi-types/dist/index.d.ts:154 +packages/quickjs-ffi-types/dist/index.d.ts:217 *** @@ -78,7 +82,7 @@ quickjs-ffi-types/dist/index.d.ts:154 #### Source -quickjs-ffi-types/dist/index.d.ts:155 +packages/quickjs-ffi-types/dist/index.d.ts:218 *** @@ -92,7 +96,7 @@ quickjs-ffi-types/dist/index.d.ts:155 #### Source -quickjs-ffi-types/dist/index.d.ts:153 +packages/quickjs-ffi-types/dist/index.d.ts:216 *** @@ -106,7 +110,7 @@ quickjs-ffi-types/dist/index.d.ts:153 #### Source -quickjs-ffi-types/dist/index.d.ts:159 +packages/quickjs-ffi-types/dist/index.d.ts:222 *** @@ -120,7 +124,7 @@ quickjs-ffi-types/dist/index.d.ts:159 #### Source -quickjs-ffi-types/dist/index.d.ts:160 +packages/quickjs-ffi-types/dist/index.d.ts:223 *** @@ -134,7 +138,7 @@ quickjs-ffi-types/dist/index.d.ts:160 #### Source -quickjs-ffi-types/dist/index.d.ts:157 +packages/quickjs-ffi-types/dist/index.d.ts:220 *** @@ -148,7 +152,7 @@ quickjs-ffi-types/dist/index.d.ts:157 #### Source -quickjs-ffi-types/dist/index.d.ts:158 +packages/quickjs-ffi-types/dist/index.d.ts:221 *** @@ -162,7 +166,7 @@ quickjs-ffi-types/dist/index.d.ts:158 #### Source -quickjs-ffi-types/dist/index.d.ts:156 +packages/quickjs-ffi-types/dist/index.d.ts:219 *** @@ -176,7 +180,7 @@ quickjs-ffi-types/dist/index.d.ts:156 #### Source -quickjs-ffi-types/dist/index.d.ts:162 +packages/quickjs-ffi-types/dist/index.d.ts:225 *** @@ -190,7 +194,7 @@ quickjs-ffi-types/dist/index.d.ts:162 #### Source -quickjs-ffi-types/dist/index.d.ts:161 +packages/quickjs-ffi-types/dist/index.d.ts:224 *** @@ -200,7 +204,7 @@ quickjs-ffi-types/dist/index.d.ts:161 #### Source -quickjs-ffi-types/dist/index.d.ts:204 +packages/quickjs-ffi-types/dist/index.d.ts:267 *** @@ -214,7 +218,23 @@ Implement this field #### Source -quickjs-ffi-types/dist/index.d.ts:203 +packages/quickjs-ffi-types/dist/index.d.ts:266 + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.wasmBinary`](EmscriptenModule.md#wasmbinary) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 ## Methods @@ -241,7 +261,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -quickjs-ffi-types/dist/index.d.ts:148 +packages/quickjs-ffi-types/dist/index.d.ts:211 *** @@ -263,7 +283,7 @@ quickjs-ffi-types/dist/index.d.ts:148 #### Source -quickjs-ffi-types/dist/index.d.ts:151 +packages/quickjs-ffi-types/dist/index.d.ts:214 *** @@ -285,7 +305,7 @@ quickjs-ffi-types/dist/index.d.ts:151 #### Source -quickjs-ffi-types/dist/index.d.ts:150 +packages/quickjs-ffi-types/dist/index.d.ts:213 *** @@ -322,7 +342,33 @@ quickjs-ffi-types/dist/index.d.ts:150 #### Source -quickjs-ffi-types/dist/index.d.ts:152 +packages/quickjs-ffi-types/dist/index.d.ts:215 + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.instantiateWasm`](EmscriptenModule.md#instantiatewasm) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 *** @@ -344,7 +390,75 @@ quickjs-ffi-types/dist/index.d.ts:152 #### Source -quickjs-ffi-types/dist/index.d.ts:149 +packages/quickjs-ffi-types/dist/index.d.ts:212 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.locateFile`](EmscriptenModule.md#locatefile) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.monitorRunDependencies`](EmscriptenModule.md#monitorrundependencies) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 *** @@ -373,7 +487,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -quickjs-ffi-types/dist/index.d.ts:143 +packages/quickjs-ffi-types/dist/index.d.ts:206 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md b/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md index 78013645..38a7ac5d 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSAsyncFFI.md @@ -94,7 +94,7 @@ Set at compile time. #### Source -quickjs-ffi-types/dist/index.d.ts:289 +packages/quickjs-ffi-types/dist/index.d.ts:352 *** @@ -114,7 +114,7 @@ quickjs-ffi-types/dist/index.d.ts:289 #### Source -quickjs-ffi-types/dist/index.d.ts:347 +packages/quickjs-ffi-types/dist/index.d.ts:410 *** @@ -128,7 +128,7 @@ quickjs-ffi-types/dist/index.d.ts:347 #### Source -quickjs-ffi-types/dist/index.d.ts:345 +packages/quickjs-ffi-types/dist/index.d.ts:408 *** @@ -142,7 +142,7 @@ quickjs-ffi-types/dist/index.d.ts:345 #### Source -quickjs-ffi-types/dist/index.d.ts:344 +packages/quickjs-ffi-types/dist/index.d.ts:407 *** @@ -156,7 +156,7 @@ quickjs-ffi-types/dist/index.d.ts:344 #### Source -quickjs-ffi-types/dist/index.d.ts:296 +packages/quickjs-ffi-types/dist/index.d.ts:359 *** @@ -182,7 +182,7 @@ quickjs-ffi-types/dist/index.d.ts:296 #### Source -quickjs-ffi-types/dist/index.d.ts:333 +packages/quickjs-ffi-types/dist/index.d.ts:396 *** @@ -208,7 +208,7 @@ quickjs-ffi-types/dist/index.d.ts:333 #### Source -quickjs-ffi-types/dist/index.d.ts:334 +packages/quickjs-ffi-types/dist/index.d.ts:397 *** @@ -242,7 +242,7 @@ quickjs-ffi-types/dist/index.d.ts:334 #### Source -quickjs-ffi-types/dist/index.d.ts:332 +packages/quickjs-ffi-types/dist/index.d.ts:395 *** @@ -262,7 +262,7 @@ quickjs-ffi-types/dist/index.d.ts:332 #### Source -quickjs-ffi-types/dist/index.d.ts:336 +packages/quickjs-ffi-types/dist/index.d.ts:399 *** @@ -282,7 +282,7 @@ quickjs-ffi-types/dist/index.d.ts:336 #### Source -quickjs-ffi-types/dist/index.d.ts:337 +packages/quickjs-ffi-types/dist/index.d.ts:400 *** @@ -302,7 +302,7 @@ quickjs-ffi-types/dist/index.d.ts:337 #### Source -quickjs-ffi-types/dist/index.d.ts:310 +packages/quickjs-ffi-types/dist/index.d.ts:373 *** @@ -328,7 +328,7 @@ quickjs-ffi-types/dist/index.d.ts:310 #### Source -quickjs-ffi-types/dist/index.d.ts:338 +packages/quickjs-ffi-types/dist/index.d.ts:401 *** @@ -354,7 +354,7 @@ quickjs-ffi-types/dist/index.d.ts:338 #### Source -quickjs-ffi-types/dist/index.d.ts:339 +packages/quickjs-ffi-types/dist/index.d.ts:402 *** @@ -376,7 +376,7 @@ quickjs-ffi-types/dist/index.d.ts:339 #### Source -quickjs-ffi-types/dist/index.d.ts:326 +packages/quickjs-ffi-types/dist/index.d.ts:389 *** @@ -398,7 +398,7 @@ quickjs-ffi-types/dist/index.d.ts:326 #### Source -quickjs-ffi-types/dist/index.d.ts:327 +packages/quickjs-ffi-types/dist/index.d.ts:390 *** @@ -418,7 +418,7 @@ quickjs-ffi-types/dist/index.d.ts:327 #### Source -quickjs-ffi-types/dist/index.d.ts:309 +packages/quickjs-ffi-types/dist/index.d.ts:372 *** @@ -436,7 +436,7 @@ quickjs-ffi-types/dist/index.d.ts:309 #### Source -quickjs-ffi-types/dist/index.d.ts:305 +packages/quickjs-ffi-types/dist/index.d.ts:368 *** @@ -454,7 +454,7 @@ quickjs-ffi-types/dist/index.d.ts:305 #### Source -quickjs-ffi-types/dist/index.d.ts:303 +packages/quickjs-ffi-types/dist/index.d.ts:366 *** @@ -474,7 +474,7 @@ quickjs-ffi-types/dist/index.d.ts:303 #### Source -quickjs-ffi-types/dist/index.d.ts:306 +packages/quickjs-ffi-types/dist/index.d.ts:369 *** @@ -494,7 +494,7 @@ quickjs-ffi-types/dist/index.d.ts:306 #### Source -quickjs-ffi-types/dist/index.d.ts:307 +packages/quickjs-ffi-types/dist/index.d.ts:370 *** @@ -514,7 +514,7 @@ quickjs-ffi-types/dist/index.d.ts:307 #### Source -quickjs-ffi-types/dist/index.d.ts:308 +packages/quickjs-ffi-types/dist/index.d.ts:371 *** @@ -534,7 +534,7 @@ quickjs-ffi-types/dist/index.d.ts:308 #### Source -quickjs-ffi-types/dist/index.d.ts:319 +packages/quickjs-ffi-types/dist/index.d.ts:382 *** @@ -554,7 +554,7 @@ quickjs-ffi-types/dist/index.d.ts:319 #### Source -quickjs-ffi-types/dist/index.d.ts:320 +packages/quickjs-ffi-types/dist/index.d.ts:383 *** @@ -568,7 +568,7 @@ quickjs-ffi-types/dist/index.d.ts:320 #### Source -quickjs-ffi-types/dist/index.d.ts:300 +packages/quickjs-ffi-types/dist/index.d.ts:363 *** @@ -588,7 +588,7 @@ quickjs-ffi-types/dist/index.d.ts:300 #### Source -quickjs-ffi-types/dist/index.d.ts:316 +packages/quickjs-ffi-types/dist/index.d.ts:379 *** @@ -606,7 +606,7 @@ quickjs-ffi-types/dist/index.d.ts:316 #### Source -quickjs-ffi-types/dist/index.d.ts:341 +packages/quickjs-ffi-types/dist/index.d.ts:404 *** @@ -620,7 +620,7 @@ quickjs-ffi-types/dist/index.d.ts:341 #### Source -quickjs-ffi-types/dist/index.d.ts:299 +packages/quickjs-ffi-types/dist/index.d.ts:362 *** @@ -642,7 +642,7 @@ quickjs-ffi-types/dist/index.d.ts:299 #### Source -quickjs-ffi-types/dist/index.d.ts:328 +packages/quickjs-ffi-types/dist/index.d.ts:391 *** @@ -664,7 +664,7 @@ quickjs-ffi-types/dist/index.d.ts:328 #### Source -quickjs-ffi-types/dist/index.d.ts:329 +packages/quickjs-ffi-types/dist/index.d.ts:392 *** @@ -684,7 +684,7 @@ quickjs-ffi-types/dist/index.d.ts:329 #### Source -quickjs-ffi-types/dist/index.d.ts:318 +packages/quickjs-ffi-types/dist/index.d.ts:381 *** @@ -704,7 +704,7 @@ quickjs-ffi-types/dist/index.d.ts:318 #### Source -quickjs-ffi-types/dist/index.d.ts:322 +packages/quickjs-ffi-types/dist/index.d.ts:385 *** @@ -724,7 +724,7 @@ quickjs-ffi-types/dist/index.d.ts:322 #### Source -quickjs-ffi-types/dist/index.d.ts:323 +packages/quickjs-ffi-types/dist/index.d.ts:386 *** @@ -738,7 +738,7 @@ quickjs-ffi-types/dist/index.d.ts:323 #### Source -quickjs-ffi-types/dist/index.d.ts:301 +packages/quickjs-ffi-types/dist/index.d.ts:364 *** @@ -752,7 +752,7 @@ quickjs-ffi-types/dist/index.d.ts:301 #### Source -quickjs-ffi-types/dist/index.d.ts:298 +packages/quickjs-ffi-types/dist/index.d.ts:361 *** @@ -772,7 +772,7 @@ quickjs-ffi-types/dist/index.d.ts:298 #### Source -quickjs-ffi-types/dist/index.d.ts:324 +packages/quickjs-ffi-types/dist/index.d.ts:387 *** @@ -790,7 +790,7 @@ quickjs-ffi-types/dist/index.d.ts:324 #### Source -quickjs-ffi-types/dist/index.d.ts:325 +packages/quickjs-ffi-types/dist/index.d.ts:388 *** @@ -808,7 +808,7 @@ quickjs-ffi-types/dist/index.d.ts:325 #### Source -quickjs-ffi-types/dist/index.d.ts:313 +packages/quickjs-ffi-types/dist/index.d.ts:376 *** @@ -830,7 +830,7 @@ quickjs-ffi-types/dist/index.d.ts:313 #### Source -quickjs-ffi-types/dist/index.d.ts:314 +packages/quickjs-ffi-types/dist/index.d.ts:377 *** @@ -848,7 +848,7 @@ quickjs-ffi-types/dist/index.d.ts:314 #### Source -quickjs-ffi-types/dist/index.d.ts:304 +packages/quickjs-ffi-types/dist/index.d.ts:367 *** @@ -866,7 +866,7 @@ quickjs-ffi-types/dist/index.d.ts:304 #### Source -quickjs-ffi-types/dist/index.d.ts:291 +packages/quickjs-ffi-types/dist/index.d.ts:354 *** @@ -886,7 +886,7 @@ quickjs-ffi-types/dist/index.d.ts:291 #### Source -quickjs-ffi-types/dist/index.d.ts:315 +packages/quickjs-ffi-types/dist/index.d.ts:378 *** @@ -908,7 +908,7 @@ quickjs-ffi-types/dist/index.d.ts:315 #### Source -quickjs-ffi-types/dist/index.d.ts:346 +packages/quickjs-ffi-types/dist/index.d.ts:409 *** @@ -926,7 +926,7 @@ quickjs-ffi-types/dist/index.d.ts:346 #### Source -quickjs-ffi-types/dist/index.d.ts:311 +packages/quickjs-ffi-types/dist/index.d.ts:374 *** @@ -946,7 +946,7 @@ quickjs-ffi-types/dist/index.d.ts:311 #### Source -quickjs-ffi-types/dist/index.d.ts:312 +packages/quickjs-ffi-types/dist/index.d.ts:375 *** @@ -966,7 +966,7 @@ quickjs-ffi-types/dist/index.d.ts:312 #### Source -quickjs-ffi-types/dist/index.d.ts:342 +packages/quickjs-ffi-types/dist/index.d.ts:405 *** @@ -980,7 +980,7 @@ quickjs-ffi-types/dist/index.d.ts:342 #### Source -quickjs-ffi-types/dist/index.d.ts:302 +packages/quickjs-ffi-types/dist/index.d.ts:365 *** @@ -1000,7 +1000,7 @@ quickjs-ffi-types/dist/index.d.ts:302 #### Source -quickjs-ffi-types/dist/index.d.ts:317 +packages/quickjs-ffi-types/dist/index.d.ts:380 *** @@ -1022,7 +1022,7 @@ quickjs-ffi-types/dist/index.d.ts:317 #### Source -quickjs-ffi-types/dist/index.d.ts:321 +packages/quickjs-ffi-types/dist/index.d.ts:384 *** @@ -1036,7 +1036,7 @@ quickjs-ffi-types/dist/index.d.ts:321 #### Source -quickjs-ffi-types/dist/index.d.ts:295 +packages/quickjs-ffi-types/dist/index.d.ts:358 *** @@ -1056,7 +1056,7 @@ quickjs-ffi-types/dist/index.d.ts:295 #### Source -quickjs-ffi-types/dist/index.d.ts:335 +packages/quickjs-ffi-types/dist/index.d.ts:398 *** @@ -1076,7 +1076,7 @@ quickjs-ffi-types/dist/index.d.ts:335 #### Source -quickjs-ffi-types/dist/index.d.ts:293 +packages/quickjs-ffi-types/dist/index.d.ts:356 *** @@ -1094,7 +1094,7 @@ quickjs-ffi-types/dist/index.d.ts:293 #### Source -quickjs-ffi-types/dist/index.d.ts:349 +packages/quickjs-ffi-types/dist/index.d.ts:412 *** @@ -1112,7 +1112,7 @@ quickjs-ffi-types/dist/index.d.ts:349 #### Source -quickjs-ffi-types/dist/index.d.ts:351 +packages/quickjs-ffi-types/dist/index.d.ts:414 *** @@ -1130,7 +1130,7 @@ quickjs-ffi-types/dist/index.d.ts:351 #### Source -quickjs-ffi-types/dist/index.d.ts:294 +packages/quickjs-ffi-types/dist/index.d.ts:357 *** @@ -1148,7 +1148,7 @@ quickjs-ffi-types/dist/index.d.ts:294 #### Source -quickjs-ffi-types/dist/index.d.ts:348 +packages/quickjs-ffi-types/dist/index.d.ts:411 *** @@ -1168,7 +1168,7 @@ quickjs-ffi-types/dist/index.d.ts:348 #### Source -quickjs-ffi-types/dist/index.d.ts:350 +packages/quickjs-ffi-types/dist/index.d.ts:413 *** @@ -1188,7 +1188,7 @@ quickjs-ffi-types/dist/index.d.ts:350 #### Source -quickjs-ffi-types/dist/index.d.ts:297 +packages/quickjs-ffi-types/dist/index.d.ts:360 *** @@ -1208,7 +1208,7 @@ quickjs-ffi-types/dist/index.d.ts:297 #### Source -quickjs-ffi-types/dist/index.d.ts:292 +packages/quickjs-ffi-types/dist/index.d.ts:355 *** @@ -1232,7 +1232,7 @@ quickjs-ffi-types/dist/index.d.ts:292 #### Source -quickjs-ffi-types/dist/index.d.ts:330 +packages/quickjs-ffi-types/dist/index.d.ts:393 *** @@ -1256,7 +1256,7 @@ quickjs-ffi-types/dist/index.d.ts:330 #### Source -quickjs-ffi-types/dist/index.d.ts:331 +packages/quickjs-ffi-types/dist/index.d.ts:394 *** @@ -1274,7 +1274,7 @@ quickjs-ffi-types/dist/index.d.ts:331 #### Source -quickjs-ffi-types/dist/index.d.ts:343 +packages/quickjs-ffi-types/dist/index.d.ts:406 *** @@ -1294,7 +1294,7 @@ quickjs-ffi-types/dist/index.d.ts:343 #### Source -quickjs-ffi-types/dist/index.d.ts:290 +packages/quickjs-ffi-types/dist/index.d.ts:353 *** @@ -1314,7 +1314,7 @@ quickjs-ffi-types/dist/index.d.ts:290 #### Source -quickjs-ffi-types/dist/index.d.ts:340 +packages/quickjs-ffi-types/dist/index.d.ts:403 *** @@ -1334,7 +1334,7 @@ quickjs-ffi-types/dist/index.d.ts:340 #### Source -quickjs-ffi-types/dist/index.d.ts:353 +packages/quickjs-ffi-types/dist/index.d.ts:416 *** @@ -1354,7 +1354,7 @@ quickjs-ffi-types/dist/index.d.ts:353 #### Source -quickjs-ffi-types/dist/index.d.ts:352 +packages/quickjs-ffi-types/dist/index.d.ts:415 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md b/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md index d7a3715b..a9b560db 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSAsyncVariant.md @@ -36,7 +36,7 @@ build variant to [newQuickJSWASMModule](../exports.md#newquickjswasmmodule) or [ #### Source -quickjs-ffi-types/dist/index.d.ts:388 +packages/quickjs-ffi-types/dist/index.d.ts:451 *** @@ -50,7 +50,7 @@ quickjs-ffi-types/dist/index.d.ts:388 #### Source -quickjs-ffi-types/dist/index.d.ts:389 +packages/quickjs-ffi-types/dist/index.d.ts:452 *** @@ -60,7 +60,7 @@ quickjs-ffi-types/dist/index.d.ts:389 #### Source -quickjs-ffi-types/dist/index.d.ts:387 +packages/quickjs-ffi-types/dist/index.d.ts:450 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md b/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md index 6aefcea8..ebd1cab2 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSEmscriptenModule.md @@ -26,12 +26,16 @@ QuickJS. - [TOTAL\_STACK](QuickJSEmscriptenModule.md#total-stack) - [callbacks](QuickJSEmscriptenModule.md#callbacks) - [type](QuickJSEmscriptenModule.md#type) + - [wasmBinary?](QuickJSEmscriptenModule.md#wasmbinary) - [Methods](QuickJSEmscriptenModule.md#methods) - [UTF8ToString()](QuickJSEmscriptenModule.md#utf8tostring) - [\_free()](QuickJSEmscriptenModule.md#free) - [\_malloc()](QuickJSEmscriptenModule.md#malloc) - [cwrap()](QuickJSEmscriptenModule.md#cwrap) + - [instantiateWasm()?](QuickJSEmscriptenModule.md#instantiatewasm) - [lengthBytesUTF8()](QuickJSEmscriptenModule.md#lengthbytesutf8) + - [locateFile()?](QuickJSEmscriptenModule.md#locatefile) + - [monitorRunDependencies()?](QuickJSEmscriptenModule.md#monitorrundependencies) - [stringToUTF8()](QuickJSEmscriptenModule.md#stringtoutf8) ## Extends @@ -50,7 +54,7 @@ QuickJS. #### Source -quickjs-ffi-types/dist/index.d.ts:163 +packages/quickjs-ffi-types/dist/index.d.ts:226 *** @@ -64,7 +68,7 @@ quickjs-ffi-types/dist/index.d.ts:163 #### Source -quickjs-ffi-types/dist/index.d.ts:154 +packages/quickjs-ffi-types/dist/index.d.ts:217 *** @@ -78,7 +82,7 @@ quickjs-ffi-types/dist/index.d.ts:154 #### Source -quickjs-ffi-types/dist/index.d.ts:155 +packages/quickjs-ffi-types/dist/index.d.ts:218 *** @@ -92,7 +96,7 @@ quickjs-ffi-types/dist/index.d.ts:155 #### Source -quickjs-ffi-types/dist/index.d.ts:153 +packages/quickjs-ffi-types/dist/index.d.ts:216 *** @@ -106,7 +110,7 @@ quickjs-ffi-types/dist/index.d.ts:153 #### Source -quickjs-ffi-types/dist/index.d.ts:159 +packages/quickjs-ffi-types/dist/index.d.ts:222 *** @@ -120,7 +124,7 @@ quickjs-ffi-types/dist/index.d.ts:159 #### Source -quickjs-ffi-types/dist/index.d.ts:160 +packages/quickjs-ffi-types/dist/index.d.ts:223 *** @@ -134,7 +138,7 @@ quickjs-ffi-types/dist/index.d.ts:160 #### Source -quickjs-ffi-types/dist/index.d.ts:157 +packages/quickjs-ffi-types/dist/index.d.ts:220 *** @@ -148,7 +152,7 @@ quickjs-ffi-types/dist/index.d.ts:157 #### Source -quickjs-ffi-types/dist/index.d.ts:158 +packages/quickjs-ffi-types/dist/index.d.ts:221 *** @@ -162,7 +166,7 @@ quickjs-ffi-types/dist/index.d.ts:158 #### Source -quickjs-ffi-types/dist/index.d.ts:156 +packages/quickjs-ffi-types/dist/index.d.ts:219 *** @@ -176,7 +180,7 @@ quickjs-ffi-types/dist/index.d.ts:156 #### Source -quickjs-ffi-types/dist/index.d.ts:162 +packages/quickjs-ffi-types/dist/index.d.ts:225 *** @@ -190,7 +194,7 @@ quickjs-ffi-types/dist/index.d.ts:162 #### Source -quickjs-ffi-types/dist/index.d.ts:161 +packages/quickjs-ffi-types/dist/index.d.ts:224 *** @@ -200,7 +204,7 @@ quickjs-ffi-types/dist/index.d.ts:161 #### Source -quickjs-ffi-types/dist/index.d.ts:199 +packages/quickjs-ffi-types/dist/index.d.ts:262 *** @@ -210,7 +214,23 @@ quickjs-ffi-types/dist/index.d.ts:199 #### Source -quickjs-ffi-types/dist/index.d.ts:198 +packages/quickjs-ffi-types/dist/index.d.ts:261 + +*** + +### wasmBinary? + +> **wasmBinary**?: `ArrayBuffer` + +Compile this to WebAssembly.Module + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.wasmBinary`](EmscriptenModule.md#wasmbinary) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:185 ## Methods @@ -237,7 +257,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString #### Source -quickjs-ffi-types/dist/index.d.ts:148 +packages/quickjs-ffi-types/dist/index.d.ts:211 *** @@ -259,7 +279,7 @@ quickjs-ffi-types/dist/index.d.ts:148 #### Source -quickjs-ffi-types/dist/index.d.ts:151 +packages/quickjs-ffi-types/dist/index.d.ts:214 *** @@ -281,7 +301,7 @@ quickjs-ffi-types/dist/index.d.ts:151 #### Source -quickjs-ffi-types/dist/index.d.ts:150 +packages/quickjs-ffi-types/dist/index.d.ts:213 *** @@ -318,7 +338,33 @@ quickjs-ffi-types/dist/index.d.ts:150 #### Source -quickjs-ffi-types/dist/index.d.ts:152 +packages/quickjs-ffi-types/dist/index.d.ts:215 + +*** + +### instantiateWasm()? + +> **`optional`** **instantiateWasm**(`imports`, `onSuccess`): `Exports` \| `Promise`\<`Exports`\> + +Create an instance of the WASM module, call onSuccess(instance), then return instance.exports + +#### Parameters + +• **imports**: `Imports` + +• **onSuccess**: (`instance`) => `void` + +#### Returns + +`Exports` \| `Promise`\<`Exports`\> + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.instantiateWasm`](EmscriptenModule.md#instantiatewasm) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:187 *** @@ -340,7 +386,75 @@ quickjs-ffi-types/dist/index.d.ts:152 #### Source -quickjs-ffi-types/dist/index.d.ts:149 +packages/quickjs-ffi-types/dist/index.d.ts:212 + +*** + +### locateFile()? + +> **`optional`** **locateFile**(`fileName`, `prefix`): `string` + +If set, this method will be called when the runtime needs to load a file, +such as a .wasm WebAssembly file, .mem memory init file, or a file +generated by the file packager. + +The function receives two parameters: + +- `fileName`, the relative path to the file as configured in build +process, eg `"emscripten-module.wasm"`. +- `prefix` (path to the main JavaScript file’s directory). This may be `''` +(empty string) in some cases if the Emscripten Javascript code can't locate +itself. Try logging it in your environment. + +It should return the actual URI or path to the requested file. + +This lets you host file packages on a different location than the directory +of the JavaScript file (which is the default expectation), for example if +you want to host them on a CDN. + +#### Parameters + +• **fileName**: `string` + +• **prefix**: `string` + +Often `''` (empty string) + +#### Returns + +`string` + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.locateFile`](EmscriptenModule.md#locatefile) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:181 + +*** + +### monitorRunDependencies()? + +> **`optional`** **monitorRunDependencies**(`left`): `void` + +Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. + +#### Parameters + +• **left**: `number` + +#### Returns + +`void` + +#### Inherited from + +[`quickjs-emscripten.EmscriptenModule.monitorRunDependencies`](EmscriptenModule.md#monitorrundependencies) + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:189 *** @@ -369,7 +483,7 @@ https://emscripten.org/docs/api_reference/preamble.js.html#stringToUTF8 #### Source -quickjs-ffi-types/dist/index.d.ts:143 +packages/quickjs-ffi-types/dist/index.d.ts:206 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSFFI.md b/doc/quickjs-emscripten/interfaces/QuickJSFFI.md index 95f2e824..ab8807bc 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSFFI.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSFFI.md @@ -87,7 +87,7 @@ Set at compile time. #### Source -quickjs-ffi-types/dist/index.d.ts:220 +packages/quickjs-ffi-types/dist/index.d.ts:283 *** @@ -107,7 +107,7 @@ quickjs-ffi-types/dist/index.d.ts:220 #### Source -quickjs-ffi-types/dist/index.d.ts:271 +packages/quickjs-ffi-types/dist/index.d.ts:334 *** @@ -121,7 +121,7 @@ quickjs-ffi-types/dist/index.d.ts:271 #### Source -quickjs-ffi-types/dist/index.d.ts:269 +packages/quickjs-ffi-types/dist/index.d.ts:332 *** @@ -135,7 +135,7 @@ quickjs-ffi-types/dist/index.d.ts:269 #### Source -quickjs-ffi-types/dist/index.d.ts:268 +packages/quickjs-ffi-types/dist/index.d.ts:331 *** @@ -149,7 +149,7 @@ quickjs-ffi-types/dist/index.d.ts:268 #### Source -quickjs-ffi-types/dist/index.d.ts:227 +packages/quickjs-ffi-types/dist/index.d.ts:290 *** @@ -175,7 +175,7 @@ quickjs-ffi-types/dist/index.d.ts:227 #### Source -quickjs-ffi-types/dist/index.d.ts:260 +packages/quickjs-ffi-types/dist/index.d.ts:323 *** @@ -209,7 +209,7 @@ quickjs-ffi-types/dist/index.d.ts:260 #### Source -quickjs-ffi-types/dist/index.d.ts:259 +packages/quickjs-ffi-types/dist/index.d.ts:322 *** @@ -229,7 +229,7 @@ quickjs-ffi-types/dist/index.d.ts:259 #### Source -quickjs-ffi-types/dist/index.d.ts:262 +packages/quickjs-ffi-types/dist/index.d.ts:325 *** @@ -249,7 +249,7 @@ quickjs-ffi-types/dist/index.d.ts:262 #### Source -quickjs-ffi-types/dist/index.d.ts:241 +packages/quickjs-ffi-types/dist/index.d.ts:304 *** @@ -275,7 +275,7 @@ quickjs-ffi-types/dist/index.d.ts:241 #### Source -quickjs-ffi-types/dist/index.d.ts:263 +packages/quickjs-ffi-types/dist/index.d.ts:326 *** @@ -297,7 +297,7 @@ quickjs-ffi-types/dist/index.d.ts:263 #### Source -quickjs-ffi-types/dist/index.d.ts:256 +packages/quickjs-ffi-types/dist/index.d.ts:319 *** @@ -317,7 +317,7 @@ quickjs-ffi-types/dist/index.d.ts:256 #### Source -quickjs-ffi-types/dist/index.d.ts:240 +packages/quickjs-ffi-types/dist/index.d.ts:303 *** @@ -335,7 +335,7 @@ quickjs-ffi-types/dist/index.d.ts:240 #### Source -quickjs-ffi-types/dist/index.d.ts:236 +packages/quickjs-ffi-types/dist/index.d.ts:299 *** @@ -353,7 +353,7 @@ quickjs-ffi-types/dist/index.d.ts:236 #### Source -quickjs-ffi-types/dist/index.d.ts:234 +packages/quickjs-ffi-types/dist/index.d.ts:297 *** @@ -373,7 +373,7 @@ quickjs-ffi-types/dist/index.d.ts:234 #### Source -quickjs-ffi-types/dist/index.d.ts:237 +packages/quickjs-ffi-types/dist/index.d.ts:300 *** @@ -393,7 +393,7 @@ quickjs-ffi-types/dist/index.d.ts:237 #### Source -quickjs-ffi-types/dist/index.d.ts:238 +packages/quickjs-ffi-types/dist/index.d.ts:301 *** @@ -413,7 +413,7 @@ quickjs-ffi-types/dist/index.d.ts:238 #### Source -quickjs-ffi-types/dist/index.d.ts:239 +packages/quickjs-ffi-types/dist/index.d.ts:302 *** @@ -433,7 +433,7 @@ quickjs-ffi-types/dist/index.d.ts:239 #### Source -quickjs-ffi-types/dist/index.d.ts:250 +packages/quickjs-ffi-types/dist/index.d.ts:313 *** @@ -453,7 +453,7 @@ quickjs-ffi-types/dist/index.d.ts:250 #### Source -quickjs-ffi-types/dist/index.d.ts:251 +packages/quickjs-ffi-types/dist/index.d.ts:314 *** @@ -467,7 +467,7 @@ quickjs-ffi-types/dist/index.d.ts:251 #### Source -quickjs-ffi-types/dist/index.d.ts:231 +packages/quickjs-ffi-types/dist/index.d.ts:294 *** @@ -487,7 +487,7 @@ quickjs-ffi-types/dist/index.d.ts:231 #### Source -quickjs-ffi-types/dist/index.d.ts:247 +packages/quickjs-ffi-types/dist/index.d.ts:310 *** @@ -505,7 +505,7 @@ quickjs-ffi-types/dist/index.d.ts:247 #### Source -quickjs-ffi-types/dist/index.d.ts:265 +packages/quickjs-ffi-types/dist/index.d.ts:328 *** @@ -519,7 +519,7 @@ quickjs-ffi-types/dist/index.d.ts:265 #### Source -quickjs-ffi-types/dist/index.d.ts:230 +packages/quickjs-ffi-types/dist/index.d.ts:293 *** @@ -541,7 +541,7 @@ quickjs-ffi-types/dist/index.d.ts:230 #### Source -quickjs-ffi-types/dist/index.d.ts:257 +packages/quickjs-ffi-types/dist/index.d.ts:320 *** @@ -561,7 +561,7 @@ quickjs-ffi-types/dist/index.d.ts:257 #### Source -quickjs-ffi-types/dist/index.d.ts:249 +packages/quickjs-ffi-types/dist/index.d.ts:312 *** @@ -581,7 +581,7 @@ quickjs-ffi-types/dist/index.d.ts:249 #### Source -quickjs-ffi-types/dist/index.d.ts:253 +packages/quickjs-ffi-types/dist/index.d.ts:316 *** @@ -595,7 +595,7 @@ quickjs-ffi-types/dist/index.d.ts:253 #### Source -quickjs-ffi-types/dist/index.d.ts:232 +packages/quickjs-ffi-types/dist/index.d.ts:295 *** @@ -609,7 +609,7 @@ quickjs-ffi-types/dist/index.d.ts:232 #### Source -quickjs-ffi-types/dist/index.d.ts:229 +packages/quickjs-ffi-types/dist/index.d.ts:292 *** @@ -629,7 +629,7 @@ quickjs-ffi-types/dist/index.d.ts:229 #### Source -quickjs-ffi-types/dist/index.d.ts:254 +packages/quickjs-ffi-types/dist/index.d.ts:317 *** @@ -647,7 +647,7 @@ quickjs-ffi-types/dist/index.d.ts:254 #### Source -quickjs-ffi-types/dist/index.d.ts:255 +packages/quickjs-ffi-types/dist/index.d.ts:318 *** @@ -665,7 +665,7 @@ quickjs-ffi-types/dist/index.d.ts:255 #### Source -quickjs-ffi-types/dist/index.d.ts:244 +packages/quickjs-ffi-types/dist/index.d.ts:307 *** @@ -687,7 +687,7 @@ quickjs-ffi-types/dist/index.d.ts:244 #### Source -quickjs-ffi-types/dist/index.d.ts:245 +packages/quickjs-ffi-types/dist/index.d.ts:308 *** @@ -705,7 +705,7 @@ quickjs-ffi-types/dist/index.d.ts:245 #### Source -quickjs-ffi-types/dist/index.d.ts:235 +packages/quickjs-ffi-types/dist/index.d.ts:298 *** @@ -723,7 +723,7 @@ quickjs-ffi-types/dist/index.d.ts:235 #### Source -quickjs-ffi-types/dist/index.d.ts:222 +packages/quickjs-ffi-types/dist/index.d.ts:285 *** @@ -743,7 +743,7 @@ quickjs-ffi-types/dist/index.d.ts:222 #### Source -quickjs-ffi-types/dist/index.d.ts:246 +packages/quickjs-ffi-types/dist/index.d.ts:309 *** @@ -765,7 +765,7 @@ quickjs-ffi-types/dist/index.d.ts:246 #### Source -quickjs-ffi-types/dist/index.d.ts:270 +packages/quickjs-ffi-types/dist/index.d.ts:333 *** @@ -783,7 +783,7 @@ quickjs-ffi-types/dist/index.d.ts:270 #### Source -quickjs-ffi-types/dist/index.d.ts:242 +packages/quickjs-ffi-types/dist/index.d.ts:305 *** @@ -803,7 +803,7 @@ quickjs-ffi-types/dist/index.d.ts:242 #### Source -quickjs-ffi-types/dist/index.d.ts:243 +packages/quickjs-ffi-types/dist/index.d.ts:306 *** @@ -823,7 +823,7 @@ quickjs-ffi-types/dist/index.d.ts:243 #### Source -quickjs-ffi-types/dist/index.d.ts:266 +packages/quickjs-ffi-types/dist/index.d.ts:329 *** @@ -837,7 +837,7 @@ quickjs-ffi-types/dist/index.d.ts:266 #### Source -quickjs-ffi-types/dist/index.d.ts:233 +packages/quickjs-ffi-types/dist/index.d.ts:296 *** @@ -857,7 +857,7 @@ quickjs-ffi-types/dist/index.d.ts:233 #### Source -quickjs-ffi-types/dist/index.d.ts:248 +packages/quickjs-ffi-types/dist/index.d.ts:311 *** @@ -879,7 +879,7 @@ quickjs-ffi-types/dist/index.d.ts:248 #### Source -quickjs-ffi-types/dist/index.d.ts:252 +packages/quickjs-ffi-types/dist/index.d.ts:315 *** @@ -893,7 +893,7 @@ quickjs-ffi-types/dist/index.d.ts:252 #### Source -quickjs-ffi-types/dist/index.d.ts:226 +packages/quickjs-ffi-types/dist/index.d.ts:289 *** @@ -913,7 +913,7 @@ quickjs-ffi-types/dist/index.d.ts:226 #### Source -quickjs-ffi-types/dist/index.d.ts:261 +packages/quickjs-ffi-types/dist/index.d.ts:324 *** @@ -933,7 +933,7 @@ quickjs-ffi-types/dist/index.d.ts:261 #### Source -quickjs-ffi-types/dist/index.d.ts:224 +packages/quickjs-ffi-types/dist/index.d.ts:287 *** @@ -951,7 +951,7 @@ quickjs-ffi-types/dist/index.d.ts:224 #### Source -quickjs-ffi-types/dist/index.d.ts:273 +packages/quickjs-ffi-types/dist/index.d.ts:336 *** @@ -969,7 +969,7 @@ quickjs-ffi-types/dist/index.d.ts:273 #### Source -quickjs-ffi-types/dist/index.d.ts:275 +packages/quickjs-ffi-types/dist/index.d.ts:338 *** @@ -987,7 +987,7 @@ quickjs-ffi-types/dist/index.d.ts:275 #### Source -quickjs-ffi-types/dist/index.d.ts:225 +packages/quickjs-ffi-types/dist/index.d.ts:288 *** @@ -1005,7 +1005,7 @@ quickjs-ffi-types/dist/index.d.ts:225 #### Source -quickjs-ffi-types/dist/index.d.ts:272 +packages/quickjs-ffi-types/dist/index.d.ts:335 *** @@ -1025,7 +1025,7 @@ quickjs-ffi-types/dist/index.d.ts:272 #### Source -quickjs-ffi-types/dist/index.d.ts:274 +packages/quickjs-ffi-types/dist/index.d.ts:337 *** @@ -1045,7 +1045,7 @@ quickjs-ffi-types/dist/index.d.ts:274 #### Source -quickjs-ffi-types/dist/index.d.ts:228 +packages/quickjs-ffi-types/dist/index.d.ts:291 *** @@ -1065,7 +1065,7 @@ quickjs-ffi-types/dist/index.d.ts:228 #### Source -quickjs-ffi-types/dist/index.d.ts:223 +packages/quickjs-ffi-types/dist/index.d.ts:286 *** @@ -1089,7 +1089,7 @@ quickjs-ffi-types/dist/index.d.ts:223 #### Source -quickjs-ffi-types/dist/index.d.ts:258 +packages/quickjs-ffi-types/dist/index.d.ts:321 *** @@ -1107,7 +1107,7 @@ quickjs-ffi-types/dist/index.d.ts:258 #### Source -quickjs-ffi-types/dist/index.d.ts:267 +packages/quickjs-ffi-types/dist/index.d.ts:330 *** @@ -1127,7 +1127,7 @@ quickjs-ffi-types/dist/index.d.ts:267 #### Source -quickjs-ffi-types/dist/index.d.ts:221 +packages/quickjs-ffi-types/dist/index.d.ts:284 *** @@ -1147,7 +1147,7 @@ quickjs-ffi-types/dist/index.d.ts:221 #### Source -quickjs-ffi-types/dist/index.d.ts:264 +packages/quickjs-ffi-types/dist/index.d.ts:327 *** @@ -1167,7 +1167,7 @@ quickjs-ffi-types/dist/index.d.ts:264 #### Source -quickjs-ffi-types/dist/index.d.ts:277 +packages/quickjs-ffi-types/dist/index.d.ts:340 *** @@ -1187,7 +1187,7 @@ quickjs-ffi-types/dist/index.d.ts:277 #### Source -quickjs-ffi-types/dist/index.d.ts:276 +packages/quickjs-ffi-types/dist/index.d.ts:339 *** diff --git a/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md b/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md index 2a929743..03d81f23 100644 --- a/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md +++ b/doc/quickjs-emscripten/interfaces/QuickJSSyncVariant.md @@ -36,7 +36,7 @@ build variant to [newQuickJSWASMModule](../exports.md#newquickjswasmmodule) or [ #### Source -quickjs-ffi-types/dist/index.d.ts:374 +packages/quickjs-ffi-types/dist/index.d.ts:437 *** @@ -50,7 +50,7 @@ quickjs-ffi-types/dist/index.d.ts:374 #### Source -quickjs-ffi-types/dist/index.d.ts:375 +packages/quickjs-ffi-types/dist/index.d.ts:438 *** @@ -60,7 +60,7 @@ quickjs-ffi-types/dist/index.d.ts:375 #### Source -quickjs-ffi-types/dist/index.d.ts:373 +packages/quickjs-ffi-types/dist/index.d.ts:436 *** diff --git a/doc/quickjs-emscripten/interfaces/RuntimeOptions.md b/doc/quickjs-emscripten/interfaces/RuntimeOptions.md index 13e42b73..734b7e38 100644 --- a/doc/quickjs-emscripten/interfaces/RuntimeOptions.md +++ b/doc/quickjs-emscripten/interfaces/RuntimeOptions.md @@ -35,7 +35,7 @@ #### Source -quickjs-emscripten-core/dist/index.d.ts:421 +packages/quickjs-emscripten-core/dist/index.d.ts:421 *** @@ -49,7 +49,7 @@ quickjs-emscripten-core/dist/index.d.ts:421 #### Source -quickjs-emscripten-core/dist/index.d.ts:416 +packages/quickjs-emscripten-core/dist/index.d.ts:416 *** @@ -63,7 +63,7 @@ quickjs-emscripten-core/dist/index.d.ts:416 #### Source -quickjs-emscripten-core/dist/index.d.ts:417 +packages/quickjs-emscripten-core/dist/index.d.ts:417 *** @@ -77,7 +77,7 @@ quickjs-emscripten-core/dist/index.d.ts:417 #### Source -quickjs-emscripten-core/dist/index.d.ts:418 +packages/quickjs-emscripten-core/dist/index.d.ts:418 *** @@ -87,7 +87,7 @@ quickjs-emscripten-core/dist/index.d.ts:418 #### Source -quickjs-emscripten-core/dist/index.d.ts:435 +packages/quickjs-emscripten-core/dist/index.d.ts:435 *** @@ -101,7 +101,7 @@ quickjs-emscripten-core/dist/index.d.ts:435 #### Source -quickjs-emscripten-core/dist/index.d.ts:419 +packages/quickjs-emscripten-core/dist/index.d.ts:419 *** @@ -115,7 +115,7 @@ quickjs-emscripten-core/dist/index.d.ts:419 #### Source -quickjs-emscripten-core/dist/index.d.ts:420 +packages/quickjs-emscripten-core/dist/index.d.ts:420 *** @@ -129,7 +129,7 @@ quickjs-emscripten-core/dist/index.d.ts:420 #### Source -quickjs-emscripten-core/dist/index.d.ts:422 +packages/quickjs-emscripten-core/dist/index.d.ts:422 *** diff --git a/doc/quickjs-emscripten/interfaces/RuntimeOptionsBase.md b/doc/quickjs-emscripten/interfaces/RuntimeOptionsBase.md index e3023dee..916a71d3 100644 --- a/doc/quickjs-emscripten/interfaces/RuntimeOptionsBase.md +++ b/doc/quickjs-emscripten/interfaces/RuntimeOptionsBase.md @@ -31,7 +31,7 @@ #### Source -quickjs-emscripten-core/dist/index.d.ts:421 +packages/quickjs-emscripten-core/dist/index.d.ts:421 *** @@ -41,7 +41,7 @@ quickjs-emscripten-core/dist/index.d.ts:421 #### Source -quickjs-emscripten-core/dist/index.d.ts:416 +packages/quickjs-emscripten-core/dist/index.d.ts:416 *** @@ -51,7 +51,7 @@ quickjs-emscripten-core/dist/index.d.ts:416 #### Source -quickjs-emscripten-core/dist/index.d.ts:417 +packages/quickjs-emscripten-core/dist/index.d.ts:417 *** @@ -61,7 +61,7 @@ quickjs-emscripten-core/dist/index.d.ts:417 #### Source -quickjs-emscripten-core/dist/index.d.ts:418 +packages/quickjs-emscripten-core/dist/index.d.ts:418 *** @@ -71,7 +71,7 @@ quickjs-emscripten-core/dist/index.d.ts:418 #### Source -quickjs-emscripten-core/dist/index.d.ts:419 +packages/quickjs-emscripten-core/dist/index.d.ts:419 *** @@ -81,7 +81,7 @@ quickjs-emscripten-core/dist/index.d.ts:419 #### Source -quickjs-emscripten-core/dist/index.d.ts:420 +packages/quickjs-emscripten-core/dist/index.d.ts:420 *** @@ -91,7 +91,7 @@ quickjs-emscripten-core/dist/index.d.ts:420 #### Source -quickjs-emscripten-core/dist/index.d.ts:422 +packages/quickjs-emscripten-core/dist/index.d.ts:422 *** diff --git a/doc/quickjs-emscripten/interfaces/SourceMapData.md b/doc/quickjs-emscripten/interfaces/SourceMapData.md new file mode 100644 index 00000000..99a173f2 --- /dev/null +++ b/doc/quickjs-emscripten/interfaces/SourceMapData.md @@ -0,0 +1,59 @@ +[quickjs-emscripten](../../packages.md) • **quickjs-emscripten** • [Readme](../README.md) \| [Exports](../exports.md) + +*** + +[quickjs-emscripten](../../packages.md) / [quickjs-emscripten](../exports.md) / SourceMapData + +# Interface: SourceMapData + +## Contents + +- [Properties](SourceMapData.md#properties) + - [mappings](SourceMapData.md#mappings) + - [names](SourceMapData.md#names) + - [sources](SourceMapData.md#sources) + - [version](SourceMapData.md#version) + +## Properties + +### mappings + +> **mappings**: `string` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:145 + +*** + +### names + +> **names**: `string`[] + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:144 + +*** + +### sources + +> **sources**: `string`[] + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:143 + +*** + +### version + +> **version**: `number` + +#### Source + +packages/quickjs-ffi-types/dist/index.d.ts:142 + +*** + +Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/) diff --git a/doc/quickjs-emscripten/interfaces/VmPropertyDescriptor.md b/doc/quickjs-emscripten/interfaces/VmPropertyDescriptor.md index afe3992e..18ee43a6 100644 --- a/doc/quickjs-emscripten/interfaces/VmPropertyDescriptor.md +++ b/doc/quickjs-emscripten/interfaces/VmPropertyDescriptor.md @@ -30,7 +30,7 @@ From https://www.figma.com/blog/how-we-built-the-figma-plugin-system/ #### Source -quickjs-emscripten-core/dist/index.d.ts:76 +packages/quickjs-emscripten-core/dist/index.d.ts:76 *** @@ -40,7 +40,7 @@ quickjs-emscripten-core/dist/index.d.ts:76 #### Source -quickjs-emscripten-core/dist/index.d.ts:77 +packages/quickjs-emscripten-core/dist/index.d.ts:77 *** @@ -58,7 +58,7 @@ quickjs-emscripten-core/dist/index.d.ts:77 #### Source -quickjs-emscripten-core/dist/index.d.ts:78 +packages/quickjs-emscripten-core/dist/index.d.ts:78 *** @@ -78,7 +78,7 @@ quickjs-emscripten-core/dist/index.d.ts:78 #### Source -quickjs-emscripten-core/dist/index.d.ts:79 +packages/quickjs-emscripten-core/dist/index.d.ts:79 *** @@ -88,7 +88,7 @@ quickjs-emscripten-core/dist/index.d.ts:79 #### Source -quickjs-emscripten-core/dist/index.d.ts:75 +packages/quickjs-emscripten-core/dist/index.d.ts:75 *** diff --git a/doc/quickjs-emscripten/namespaces/errors/README.md b/doc/quickjs-emscripten/namespaces/errors/README.md index 898bbbb4..4bbe4a7b 100644 --- a/doc/quickjs-emscripten/namespaces/errors/README.md +++ b/doc/quickjs-emscripten/namespaces/errors/README.md @@ -11,6 +11,7 @@ - [Type Aliases](README.md#type-aliases) - [QuickJSAsyncifyError](README.md#quickjsasyncifyerror) - [QuickJSAsyncifySuspended](README.md#quickjsasyncifysuspended) + - [QuickJSEmscriptenModuleError](README.md#quickjsemscriptenmoduleerror) - [QuickJSMemoryLeakDetected](README.md#quickjsmemoryleakdetected) - [QuickJSNotImplemented](README.md#quickjsnotimplemented) - [QuickJSUnwrapError](README.md#quickjsunwraperror) @@ -19,6 +20,7 @@ - [Variables](README.md#variables) - [QuickJSAsyncifyError](README.md#quickjsasyncifyerror-1) - [QuickJSAsyncifySuspended](README.md#quickjsasyncifysuspended-1) + - [QuickJSEmscriptenModuleError](README.md#quickjsemscriptenmoduleerror-1) - [QuickJSMemoryLeakDetected](README.md#quickjsmemoryleakdetected-1) - [QuickJSNotImplemented](README.md#quickjsnotimplemented-1) - [QuickJSUnwrapError](README.md#quickjsunwraperror-1) @@ -33,7 +35,7 @@ #### Source -quickjs-emscripten-core/dist/index.d.ts:1347 +packages/quickjs-emscripten-core/dist/index.d.ts:1392 *** @@ -43,7 +45,17 @@ quickjs-emscripten-core/dist/index.d.ts:1347 #### Source -quickjs-emscripten-core/dist/index.d.ts:1349 +packages/quickjs-emscripten-core/dist/index.d.ts:1394 + +*** + +### QuickJSEmscriptenModuleError + +> **QuickJSEmscriptenModuleError**: `QuickJSEmscriptenModuleError` + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1396 *** @@ -53,7 +65,7 @@ quickjs-emscripten-core/dist/index.d.ts:1349 #### Source -quickjs-emscripten-core/dist/index.d.ts:1351 +packages/quickjs-emscripten-core/dist/index.d.ts:1398 *** @@ -63,7 +75,7 @@ quickjs-emscripten-core/dist/index.d.ts:1351 #### Source -quickjs-emscripten-core/dist/index.d.ts:1353 +packages/quickjs-emscripten-core/dist/index.d.ts:1400 *** @@ -73,7 +85,7 @@ quickjs-emscripten-core/dist/index.d.ts:1353 #### Source -quickjs-emscripten-core/dist/index.d.ts:1355 +packages/quickjs-emscripten-core/dist/index.d.ts:1402 *** @@ -83,7 +95,7 @@ quickjs-emscripten-core/dist/index.d.ts:1355 #### Source -quickjs-emscripten-core/dist/index.d.ts:1357 +packages/quickjs-emscripten-core/dist/index.d.ts:1404 *** @@ -93,7 +105,7 @@ quickjs-emscripten-core/dist/index.d.ts:1357 #### Source -quickjs-emscripten-core/dist/index.d.ts:1359 +packages/quickjs-emscripten-core/dist/index.d.ts:1406 ## Variables @@ -103,7 +115,7 @@ quickjs-emscripten-core/dist/index.d.ts:1359 #### Source -quickjs-emscripten-core/dist/index.d.ts:1347 +packages/quickjs-emscripten-core/dist/index.d.ts:1392 *** @@ -113,7 +125,17 @@ quickjs-emscripten-core/dist/index.d.ts:1347 #### Source -quickjs-emscripten-core/dist/index.d.ts:1349 +packages/quickjs-emscripten-core/dist/index.d.ts:1394 + +*** + +### QuickJSEmscriptenModuleError + +> **QuickJSEmscriptenModuleError**: *typeof* `QuickJSEmscriptenModuleError` + +#### Source + +packages/quickjs-emscripten-core/dist/index.d.ts:1396 *** @@ -123,7 +145,7 @@ quickjs-emscripten-core/dist/index.d.ts:1349 #### Source -quickjs-emscripten-core/dist/index.d.ts:1351 +packages/quickjs-emscripten-core/dist/index.d.ts:1398 *** @@ -133,7 +155,7 @@ quickjs-emscripten-core/dist/index.d.ts:1351 #### Source -quickjs-emscripten-core/dist/index.d.ts:1353 +packages/quickjs-emscripten-core/dist/index.d.ts:1400 *** @@ -143,7 +165,7 @@ quickjs-emscripten-core/dist/index.d.ts:1353 #### Source -quickjs-emscripten-core/dist/index.d.ts:1355 +packages/quickjs-emscripten-core/dist/index.d.ts:1402 *** @@ -153,7 +175,7 @@ quickjs-emscripten-core/dist/index.d.ts:1355 #### Source -quickjs-emscripten-core/dist/index.d.ts:1357 +packages/quickjs-emscripten-core/dist/index.d.ts:1404 *** @@ -163,7 +185,7 @@ quickjs-emscripten-core/dist/index.d.ts:1357 #### Source -quickjs-emscripten-core/dist/index.d.ts:1359 +packages/quickjs-emscripten-core/dist/index.d.ts:1406 *** diff --git a/examples/cloudflare-workers/.editorconfig b/examples/cloudflare-workers/.editorconfig new file mode 100644 index 00000000..64ab2601 --- /dev/null +++ b/examples/cloudflare-workers/.editorconfig @@ -0,0 +1,13 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = tab +tab_width = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.yml] +indent_style = space diff --git a/examples/cloudflare-workers/.gitignore b/examples/cloudflare-workers/.gitignore new file mode 100644 index 00000000..5fbbae70 --- /dev/null +++ b/examples/cloudflare-workers/.gitignore @@ -0,0 +1,4 @@ +src/*.wasm +src/*.wasm.* +node_modules +.wrangler diff --git a/examples/cloudflare-workers/.prettierrc b/examples/cloudflare-workers/.prettierrc new file mode 100644 index 00000000..5c7b5d3c --- /dev/null +++ b/examples/cloudflare-workers/.prettierrc @@ -0,0 +1,6 @@ +{ + "printWidth": 140, + "singleQuote": true, + "semi": true, + "useTabs": true +} diff --git a/examples/cloudflare-workers/README.md b/examples/cloudflare-workers/README.md new file mode 100644 index 00000000..2d5f5f23 --- /dev/null +++ b/examples/cloudflare-workers/README.md @@ -0,0 +1,6 @@ +# quickjs-emscripten + cloudflare workers + +Cloudflare Workers need some extra setup steps because of the unusual environment and limitations with the bundling defaults, because Cloudflare refuses to let us read these files and compile them from bytes. + +1. We need to copy the WASM files for the QuickJS variants in use into the `src` directory, so we can import them directly. See [copy-wasm-file-into-src.sh](./copy-wasm-file-into-src.sh). +2. We need to override the normal loading behavior to use the special imported WebAssembly.Module. See [src/index.mts](./src/index.mts). diff --git a/examples/cloudflare-workers/copy-wasm-file-into-src.sh b/examples/cloudflare-workers/copy-wasm-file-into-src.sh new file mode 100755 index 00000000..7cfab0da --- /dev/null +++ b/examples/cloudflare-workers/copy-wasm-file-into-src.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# +# quickjs-emscripten exposes an export for the .wasm file, but Cloudflare refuses to accept it. +# Cloudflare's build system only allows importing .wasm files using a relative path. +# Github issue: https://github.com/cloudflare/workers-sdk/issues/1672 +# +# Instead the easy way out is to just copy the .wasm files we need into the build directory. +# Once there, we can import them and use them to make a new quickjs variant. +# + +set -eo pipefail + +VARIANTS=( + DEBUG_SYNC + RELEASE_SYNC +) + +for VARIANT in "${VARIANTS[@]}"; do + kebab="$(echo "$VARIANT" | tr '[:upper:]' '[:lower:]' | tr '_' '-')" + WASM_FILE="$(node -p 'require.resolve("@jitl/quickjs-wasmfile-'$kebab'/wasm")')" + cp -v "$WASM_FILE" src/$VARIANT.wasm + if [[ -f "$WASM_FILE.map" ]]; then + cp -v "$WASM_FILE.map" src/$VARIANT.wasm.map.txt + fi +done diff --git a/examples/cloudflare-workers/package-lock.json b/examples/cloudflare-workers/package-lock.json new file mode 100644 index 00000000..ecc63a4c --- /dev/null +++ b/examples/cloudflare-workers/package-lock.json @@ -0,0 +1,1238 @@ +{ + "name": "raspy-glade-9e89", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "raspy-glade-9e89", + "version": "0.0.0", + "devDependencies": { + "@cloudflare/workers-types": "^4.20231218.0", + "typescript": "^5.0.4", + "wrangler": "^3.0.0" + } + }, + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.2.0.tgz", + "integrity": "sha512-MVbXLbTcAotOPUj0pAMhVtJ+3/kFkwJqc5qNOleOZTv6QkZZABDMS21dSrSlVswEHwrpWC03e4fWytjqKvuE2A==", + "dev": true, + "dependencies": { + "mime": "^3.0.0" + } + }, + "node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20231030.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20231030.0.tgz", + "integrity": "sha512-J4PQ9utPxLya9yHdMMx3AZeC5M/6FxcoYw6jo9jbDDFTy+a4Gslqf4Im9We3aeOEdPXa3tgQHVQOSelJSZLhIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20231030.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20231030.0.tgz", + "integrity": "sha512-WSJJjm11Del4hSneiNB7wTXGtBXI4QMCH9l5qf4iT5PAW8cESGcCmdHtWDWDtGAAGcvmLT04KNvmum92vRKKQQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-64": { + "version": "1.20231030.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20231030.0.tgz", + "integrity": "sha512-2HUeRTvoCC17fxE0qdBeR7J9dO8j4A8ZbdcvY8pZxdk+zERU6+N03RTbk/dQMU488PwiDvcC3zZqS4gwLfVT8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-arm64": { + "version": "1.20231030.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20231030.0.tgz", + "integrity": "sha512-4/GK5zHh+9JbUI6Z5xTCM0ZmpKKHk7vu9thmHjUxtz+o8Ne9DoD7DlDvXQWgMF6XGaTubDWyp3ttn+Qv8jDFuQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-windows-64": { + "version": "1.20231030.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20231030.0.tgz", + "integrity": "sha512-fb/Jgj8Yqy3PO1jLhk7mTrHMkR8jklpbQFud6rL/aMAn5d6MQbaSrYOCjzkKGp0Zng8D2LIzSl+Fc0C9Sggxjg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workers-types": { + "version": "4.20231218.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20231218.0.tgz", + "integrity": "sha512-Vs1FKjfUjXYGbCsXzkl+ITp0Iyb6QiW6+vTERTNThC+v96T0IvPVAioH4tT20rXwoxAfxh380mAaxYtTrJUNVg==", + "dev": true + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild-plugins/node-globals-polyfill": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz", + "integrity": "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==", + "dev": true, + "peerDependencies": { + "esbuild": "*" + } + }, + "node_modules/@esbuild-plugins/node-modules-polyfill": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz", + "integrity": "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^4.0.0", + "rollup-plugin-node-polyfills": "^0.2.1" + }, + "peerDependencies": { + "esbuild": "*" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", + "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@types/node": { + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.10.tgz", + "integrity": "sha512-y6PJDYN4xYBxwd22l+OVH35N+1fCYWiuC3aiP2SlXVE6Lo7SS+rSx9r89hLxrP4pn6n1lBGhHJ12pj3F3Mpttw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/acorn": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/as-table": { + "version": "1.0.55", + "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz", + "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==", + "dev": true, + "dependencies": { + "printable-characters": "^1.0.42" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/blake3-wasm": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", + "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", + "dev": true + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/capnp-ts": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/capnp-ts/-/capnp-ts-0.7.0.tgz", + "integrity": "sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==", + "dev": true, + "dependencies": { + "debug": "^4.3.1", + "tslib": "^2.2.0" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz", + "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/esbuild": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "node_modules/exit-hook": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", + "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-source": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", + "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==", + "dev": true, + "dependencies": { + "data-uri-to-buffer": "^2.0.0", + "source-map": "^0.6.1" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/miniflare": { + "version": "3.20231030.4", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20231030.4.tgz", + "integrity": "sha512-7MBz0ArLuDop1WJGZC6tFgN6c5MRyDOIlxbm3yp0TRBpvDS/KsTuWCQcCjsxN4QQ5zvL3JTkuIZbQzRRw/j6ow==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-walk": "^8.2.0", + "capnp-ts": "^0.7.0", + "exit-hook": "^2.2.1", + "glob-to-regexp": "^0.4.1", + "source-map-support": "0.5.21", + "stoppable": "^1.1.0", + "undici": "^5.22.1", + "workerd": "1.20231030.0", + "ws": "^8.11.0", + "youch": "^3.2.2", + "zod": "^3.20.6" + }, + "bin": { + "miniflare": "bootstrap.js" + }, + "engines": { + "node": ">=16.13" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "dev": true, + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/printable-characters": { + "version": "1.0.42", + "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", + "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==", + "dev": true + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/rollup-plugin-inject": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", + "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1", + "magic-string": "^0.25.3", + "rollup-pluginutils": "^2.8.1" + } + }, + "node_modules/rollup-plugin-node-polyfills": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", + "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", + "dev": true, + "dependencies": { + "rollup-plugin-inject": "^3.0.0" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/selfsigned": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", + "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "dev": true, + "dependencies": { + "@types/node-forge": "^1.3.0", + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true + }, + "node_modules/stacktracey": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", + "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==", + "dev": true, + "dependencies": { + "as-table": "^1.0.36", + "get-source": "^2.0.12" + } + }, + "node_modules/stoppable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", + "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", + "dev": true, + "engines": { + "node": ">=4", + "npm": ">=6" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici": { + "version": "5.28.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", + "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "dev": true, + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/workerd": { + "version": "1.20231030.0", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20231030.0.tgz", + "integrity": "sha512-+FSW+d31f8RrjHanFf/R9A+Z0csf3OtsvzdPmAKuwuZm/5HrBv83cvG9fFeTxl7/nI6irUUXIRF9xcj/NomQzQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20231030.0", + "@cloudflare/workerd-darwin-arm64": "1.20231030.0", + "@cloudflare/workerd-linux-64": "1.20231030.0", + "@cloudflare/workerd-linux-arm64": "1.20231030.0", + "@cloudflare/workerd-windows-64": "1.20231030.0" + } + }, + "node_modules/wrangler": { + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.22.1.tgz", + "integrity": "sha512-fN7WOF6Ono/TV5V90PuJQNf0azS7B+5C/N/KRjqhlAIQBz+c0yLOGkF6kC/akxjr1yIAC9AzcPk9+OuTSq0C+g==", + "dev": true, + "dependencies": { + "@cloudflare/kv-asset-handler": "^0.2.0", + "@cspotcode/source-map-support": "0.8.1", + "@esbuild-plugins/node-globals-polyfill": "^0.2.3", + "@esbuild-plugins/node-modules-polyfill": "^0.2.2", + "blake3-wasm": "^2.1.5", + "chokidar": "^3.5.3", + "esbuild": "0.17.19", + "miniflare": "3.20231030.4", + "nanoid": "^3.3.3", + "path-to-regexp": "^6.2.0", + "resolve.exports": "^2.0.2", + "selfsigned": "^2.0.1", + "source-map": "0.6.1", + "xxhash-wasm": "^1.0.1" + }, + "bin": { + "wrangler": "bin/wrangler.js", + "wrangler2": "bin/wrangler.js" + }, + "engines": { + "node": ">=16.17.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xxhash-wasm": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz", + "integrity": "sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==", + "dev": true + }, + "node_modules/youch": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz", + "integrity": "sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==", + "dev": true, + "dependencies": { + "cookie": "^0.5.0", + "mustache": "^4.2.0", + "stacktracey": "^2.1.8" + } + }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/examples/cloudflare-workers/package.json b/examples/cloudflare-workers/package.json new file mode 100644 index 00000000..527ddf34 --- /dev/null +++ b/examples/cloudflare-workers/package.json @@ -0,0 +1,15 @@ +{ + "name": "raspy-glade-9e89", + "version": "0.0.0", + "private": true, + "scripts": { + "deploy": "./copy-wasm-file-into-src.sh && wrangler deploy", + "dev": "./copy-wasm-file-into-src.sh && wrangler dev", + "start": "wrangler dev" + }, + "devDependencies": { + "@cloudflare/workers-types": "^4.20231218.0", + "typescript": "^5.0.4", + "wrangler": "^3.0.0" + } +} diff --git a/examples/cloudflare-workers/src/DEBUG_SYNC.wasm.map b/examples/cloudflare-workers/src/DEBUG_SYNC.wasm.map new file mode 100644 index 00000000..d408b75d --- /dev/null +++ b/examples/cloudflare-workers/src/DEBUG_SYNC.wasm.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/errno/__errno_location.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__fpclassifyl.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__signbitl.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/__stdio_close.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/__stdio_seek.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/__stdio_write.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/acos.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/acosh.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/asin.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/asinh.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/atan.c","../../../../../../../.emscripten_cache/sysroot/include/math.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/atan2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/atanh.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/exit/atexit.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdlib/atoi.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/cbrt.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/ceil.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/__lockfile.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__cos.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__rem_pio2_large.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__rem_pio2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__sin.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/cos.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__expo2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/cosh.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/emscripten_memcpy.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/memmove.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/memset.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/emscripten_time.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__math_xflow.c","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/internal/libm.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__math_uflow.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__math_oflow.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/exp.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/expm1.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/fabs.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/fclose.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/fenv/fenv.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/fenv/fesetround.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/fflush.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/__toread.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/__uflow.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/floor.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/fmax.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/fmemopen.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/fmin.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/fmod.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/fprintf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/__towrite.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/fputs.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/fwrite.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/hypot.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/ctype/isdigit.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/ctype/isspace.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/unistd/getpid.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/pthread/library_pthread_stub.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__math_divzero.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__math_invalid.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/log.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/log10.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/log1p.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/log2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/lrint.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/unistd/lseek.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/memchr.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/memcmp.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stat/mkdir.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/mktime.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/time/clock_nanosleep.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/time/nanosleep.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/ofl.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/ofl_add.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/pow.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/printf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/pthread/pthread_self_stub.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/rint.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/round.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/scalbn.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/sigaction.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/sin.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/sinh.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/snprintf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/sprintf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/sqrt.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/stdout.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strcat.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strchr.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strchrnul.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strcmp.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/stpcpy.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strcpy.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strdup.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strlen.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strnlen.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/memrchr.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/string/strrchr.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/internal/shgetc.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/copysignl.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/scalbnl.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/fmodl.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/fabsl.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/internal/floatscan.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdlib/strtod.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/internal/syscall_ret.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/conf/sysconf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/__tan.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/tan.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/tanh.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/trunc.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/tzset.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/math/frexp.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/vfprintf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/vsnprintf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/stdio/vsprintf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/wasi-helpers.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/multibyte/wcrtomb.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/multibyte/wctomb.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/emscripten_get_heap_size.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/sbrk.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/dlmalloc.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/addtf3.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_add_impl.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_lib.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/ashlti3.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/comparetf2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_compare_impl.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/divtf3.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_div_impl.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/extenddftf2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_extend_impl.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_extend.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/extendsftf2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/floatsitf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/floatunsitf.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_mode.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/lshrti3.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/multf3.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_mul_impl.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/multi3.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/subtf3.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/trunctfdf2.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_trunc_impl.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/builtins/fp_trunc.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_thread.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flags.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_allocator.cpp","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_libc.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_common.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_local_cache.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flat_map.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_common.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_common.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_list.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_interceptors.cpp","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_dlsym.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flat_map.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_linux.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libcxxabi/src/stdlib_typeinfo.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libcxxabi/src/private_typeinfo.cpp","../../../../../../../.emscripten_cache/sysroot/include/c++/v1/typeinfo","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_posix.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_posix.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_thread.cpp","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_dense_map.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_thread_arg_retval.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_flags.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_common.cpp","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_libc.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_dense_map_info.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_array_ref.h","../../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_report_decorator.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/lsan/lsan_common_emscripten.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_local_cache.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_list.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_checks.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_report.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_report_decorator.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_common.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/emscripten_mmap.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/mman/mmap.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/mman/munmap.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/stack_limits.S","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_emscripten.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flags.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_libc.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/unistd/usleep.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/libc/musl/src/thread/pthread_self.c","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_printf.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_range.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_leb128.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_lzw.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_dense_map_info.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_dense_map.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_hash.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_emscripten.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_emscripten.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/emscripten_tempret.s","../../../../../../../../opt/homebrew/Cellar/emscripten/3.1.50/libexec/system/lib/compiler-rt/stack_ops.S"],"names":[],"mappings":"+z60CAiBC,OCcD,K,UAGQ,WADK,MAAG,OAEX,eACY,KAAR,EAIT,EAFiB,KAAR,IAET,ICpCA,C,MAEC,GCDA,KAQsC,KAAf,GAAhB,EAAP,GCRkB,KAAX,OAAP,GCDD,G,SAEmB,OAAjB,KAAsC,OACtC,cAD0C,OAA1C,KAI2B,kBAMe,eAAnB,cAAnB,aAGE,SAIE,GAAJ,QAKI,CAAJ,SAMa,SAAT,OAAJ,EAI6B,aAJ7B,IAIsC,GAA1B,SACT,GAAQ,cANX,WAjBsC,KAkBtC,OAlBmB,SAAnB,YAOI,IACM,OACM,KAAX,OADc,SAAL,CAAT,kBAKW,OAAU,GACpB,iBACK,CAAP,EAA6B,OAAR,IAU/B,mBCuBC,iBACQ,SAED,CAAH,YAII,CADP,GACmB,CAAf,wBAEI,EA2BV,WAvBa,KAAH,CAuBV,cApBQ,CAAH,qBACI,CAAH,WAEgC,OAAH,GAAH,EAAf,aAiBjB,QAdQ,CAAH,sBACK,UAAG,CACP,KACA,SAAM,WACY,CAAJ,CAAV,KAUV,WAPS,YAAG,CACP,KAIA,OAAM,CAFV,aACM,MAAU,KAAH,CACH,CACE,GAAJ,QACT,KAhDA,C,mBAEuC,WAAP,WAAP,WAAP,WAAP,WAAL,oBACuB,WAAP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A,oBAAsB,CAAmB,CAAzC,CAGA,MDlKD,+BCyKH,CAAc,GAAL,GoFoEf,apFjFU,YD5JD,oCCuKM,IoFsEf,EtFqMI,wBsFxMF,sBACA,2BpFlJuC,MA0BxB,UE/Ib,uBFqHqC,UoB7FZ,GACQ,Q+CwjBX,OADG,6BrEzKpB,QAtCyD,EAI5D,OA/B0B,GAkC9B,qBAlC4B,CAmC5B,SACO,MqEyML,QACA,UACI,YAcwC,GAQN,SAjZtC,QAEA,qBACE,OAD4D,CAAN,KAAxD,OAyXI,UAK4C,IAA1C,GrErkBH,UAAD,MACe,GAAF,eA2W+C,EAahE,EACa,SAAW,GAAO,GAAF,CqEuP3B,IAxCF,ErEtNA,sBACA,sBqE2ME,sBA1XA,uBrEoLF,kBqEgOa,WACP,mBAMK,GrEhmBN,UAAD,MACe,GAAF,gBqE+lBF,OAAT,ErEhmBF,MACa,EAAE,GAAF,SA0UjB,OqEyRe,OAFoD,KrEjRrC,GAAF,CqEmRb,QADN,WAEL,UACA,GrEtmBA,MACa,EAAE,GAAF,SqEqmBb,QrEtmBA,MACa,EAAE,GAAF,eA2W+C,EAahE,EACa,OAAW,GAAO,GAAF,CqEmPpB,wBAnBQ,CAgBjB,ErE/RA,sBqE0RI,wBACA,wBrE7OJ,eqEnKF,G,aAwXgD,GAQN,aAjZtC,QAEA,4BACE,OAD4D,CAAN,KAAxD,IAqByD,OAAzD,ED1HO,WC2H2C,GAsNI,YAhNlD,OACyB,OAAF,GAEZ,OADX,GAuWkC,SA9SmB,CAgTb,QAlXmB,CAAN,KAAzD,IAkBF,SAzCE,uBA8BI,uBkBlIR,C,EAAmB,GACE,ECjKrB,C,EACA,EACA,EAKA,C,EACA,ECDA,C,EACA,EAIA,C,EACA,EACA,KAKA,EAEA,EAEA,CAEA,EACA,CACA,EACA,EACA,EACA,EAIA,C,EACA,G"} \ No newline at end of file diff --git a/examples/cloudflare-workers/src/cloudflare.d.ts b/examples/cloudflare-workers/src/cloudflare.d.ts new file mode 100644 index 00000000..d54ebdc1 --- /dev/null +++ b/examples/cloudflare-workers/src/cloudflare.d.ts @@ -0,0 +1,7 @@ +declare module '*.wasm' { + export default WebAssembly.Module; +} + +declare module '*.txt' { + export default string; +} diff --git a/examples/cloudflare-workers/src/index.mts b/examples/cloudflare-workers/src/index.mts new file mode 100644 index 00000000..e6cfd463 --- /dev/null +++ b/examples/cloudflare-workers/src/index.mts @@ -0,0 +1,41 @@ +/** + * Welcome to Cloudflare Workers! This is your first worker. + * + * - Run `npm run dev` in your terminal to start a development server + * - Open a browser tab at http://localhost:8787/ to see your worker in action + * - Run `npm run deploy` to publish your worker + * + * Learn more at https://developers.cloudflare.com/workers/ + */ + +import type { QuickJSWASMModule } from 'quickjs-emscripten'; +import { newQuickJSWASMModule, DEBUG_SYNC as baseVariant, newVariant } from 'quickjs-emscripten'; +import cloudflareWasmModule from './DEBUG_SYNC.wasm'; +import cloudflareWasmModuleSourceMap from './DEBUG_SYNC.wasm.map.txt'; + +/** + * We need to make a new variant that directly passes the imported WebAssembly.Module + * to Emscripten. Normally we'd load the wasm file as bytes from a URL, but + * that's forbidden in Cloudflare workers. + */ +const cloudflareVariant = newVariant(baseVariant, { + wasmModule: cloudflareWasmModule, + wasmSourceMapData: cloudflareWasmModuleSourceMap, +}); + +export interface Env { + // Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/ + // MY_KV_NAMESPACE: KVNamespace; +} + +let QuickJS: QuickJSWASMModule | undefined; + +export default { + async fetch(_request: Request, _env: Env, _ctx: ExecutionContext): Promise { + QuickJS ??= await newQuickJSWASMModule(cloudflareVariant); + const url = new URL(_request.url); + const code = url.searchParams.get('code') ?? '"Set ?code= to a JS expression to eval"'; + const result = QuickJS.evalCode(code); + return new Response(JSON.stringify({ code, result })); + }, +}; diff --git a/examples/cloudflare-workers/tsconfig.json b/examples/cloudflare-workers/tsconfig.json new file mode 100644 index 00000000..b08cfd92 --- /dev/null +++ b/examples/cloudflare-workers/tsconfig.json @@ -0,0 +1,103 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + // "incremental": true, /* Enable incremental compilation */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "lib": ["es2021"] /* Specify a set of bundled library declaration files that describe the target runtime environment. */, + "jsx": "react" /* Specify what JSX code is generated. */, + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ + // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + + /* Modules */ + "module": "es2022" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ + "types": [ + "@cloudflare/workers-types/2023-07-01" + ] /* Specify type package names to be included without being referenced in a source file. */, + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + "resolveJsonModule": true /* Enable importing .json files */, + // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + "allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */, + "checkJs": false /* Enable error reporting in type-checked JavaScript files. */, + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true /* Disable emitting files from a compilation. */, + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + "isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */, + "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */, + // "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ + // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ + // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/examples/cloudflare-workers/wrangler.toml b/examples/cloudflare-workers/wrangler.toml new file mode 100644 index 00000000..6c353f0e --- /dev/null +++ b/examples/cloudflare-workers/wrangler.toml @@ -0,0 +1,4 @@ +name = "cloudflare-workers-example" +main = "src/index.mts" +compatibility_date = "2023-12-18" + diff --git a/examples/deno/.gitignore b/examples/deno/.gitignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/examples/deno/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/examples/deno/README.md b/examples/deno/README.md new file mode 100644 index 00000000..29929412 --- /dev/null +++ b/examples/deno/README.md @@ -0,0 +1,5 @@ +# deno + quickjs-emscripten + +Deno's support for NPM specifiers makes it easy to use quickjs-emscripten these days. + +Just add an `import { ...} from 'npm:quickjs-emscripten@0.25.0'` (or any other semver range), it works just fine. diff --git a/examples/deno/main.ts b/examples/deno/main.ts new file mode 100755 index 00000000..63853e14 --- /dev/null +++ b/examples/deno/main.ts @@ -0,0 +1,4 @@ +#!/usr/bin/env -S deno run --allow-read --unstable-byonm +import { getQuickJS } from "npm:quickjs-emscripten" +const QuickJS = await getQuickJS() +console.log(QuickJS.evalCode("1+1")) diff --git a/examples/deno/package-lock.json b/examples/deno/package-lock.json new file mode 100644 index 00000000..5eded352 --- /dev/null +++ b/examples/deno/package-lock.json @@ -0,0 +1,80 @@ +{ + "name": "deno", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@jitl/quickjs-ffi-types": "file:../../build/tar/@jitl-quickjs-ffi-types.tgz", + "@jitl/quickjs-wasmfile-debug-asyncify": "file:../../build/tar/@jitl-quickjs-wasmfile-debug-asyncify.tgz", + "@jitl/quickjs-wasmfile-debug-sync": "file:../../build/tar/@jitl-quickjs-wasmfile-debug-sync.tgz", + "@jitl/quickjs-wasmfile-release-asyncify": "file:../../build/tar/@jitl-quickjs-wasmfile-release-asyncify.tgz", + "@jitl/quickjs-wasmfile-release-sync": "file:../../build/tar/@jitl-quickjs-wasmfile-release-sync.tgz", + "quickjs-emscripten": "file:../../build/tar/quickjs-emscripten.tgz", + "quickjs-emscripten-core": "file:../../build/tar/quickjs-emscripten-core.tgz" + } + }, + "node_modules/@jitl/quickjs-ffi-types": { + "version": "0.25.1", + "resolved": "file:../../build/tar/@jitl-quickjs-ffi-types.tgz", + "integrity": "sha512-PtyXxJxf8+7nLRvYk3DPEeIhceFaE0zaBbnzVw8L5iFqLAE7YbIxvtcyIjnpeE84dHFjvL3OLGz0YeAXwutbnw==" + }, + "node_modules/@jitl/quickjs-wasmfile-debug-asyncify": { + "version": "0.25.1", + "resolved": "file:../../build/tar/@jitl-quickjs-wasmfile-debug-asyncify.tgz", + "integrity": "sha512-0bN7QFjKdoIVMXhU37ehNbeP1pHWsmsr/shfziKnQq13u9wnJHIcOdgX/PC+UeiYRLGEb8MRKHi47bCYJMSWpQ==", + "dependencies": { + "@jitl/quickjs-ffi-types": "0.25.1" + } + }, + "node_modules/@jitl/quickjs-wasmfile-debug-sync": { + "version": "0.25.1", + "resolved": "file:../../build/tar/@jitl-quickjs-wasmfile-debug-sync.tgz", + "integrity": "sha512-+y9Q+jhfl/5xaBqcfBSI5LRMjNrYJTHpH2d6cAjpBvzc5ijeG6GM+CoYDg0T4+1gXCgIXzi71ChoTPCc4hx20g==", + "dependencies": { + "@jitl/quickjs-ffi-types": "0.25.1" + } + }, + "node_modules/@jitl/quickjs-wasmfile-release-asyncify": { + "version": "0.25.1", + "resolved": "file:../../build/tar/@jitl-quickjs-wasmfile-release-asyncify.tgz", + "integrity": "sha512-vWaSYpmYl/8aPICn+ZTAFsq6wRhLgR3MOvFsun+jTD/vZEKTM1ETa0+QXK4S1Ii2uhUNDaRhBTw/N4lE1FlnDA==", + "dependencies": { + "@jitl/quickjs-ffi-types": "0.25.1" + } + }, + "node_modules/@jitl/quickjs-wasmfile-release-sync": { + "version": "0.25.1", + "resolved": "file:../../build/tar/@jitl-quickjs-wasmfile-release-sync.tgz", + "integrity": "sha512-ONGiWzUe6MWoJezanVgOWYTisjJu4iKZsHfgBprvtoqWDaU82tk8VWOIa42lQng2ch6T2XeZjZHVnCKSB9uydw==", + "dependencies": { + "@jitl/quickjs-ffi-types": "0.25.1" + } + }, + "node_modules/quickjs-emscripten": { + "version": "0.25.1", + "resolved": "file:../../build/tar/quickjs-emscripten.tgz", + "integrity": "sha512-tvXksqc5Fnq7IAvrcdZWuBOcM2YkHn833on3GuH0VgasE0FU3O+6XmzKr6jcf+d+se5uMRMn9dgG1XX9DcZQKA==", + "license": "MIT", + "dependencies": { + "@jitl/quickjs-wasmfile-debug-asyncify": "0.25.1", + "@jitl/quickjs-wasmfile-debug-sync": "0.25.1", + "@jitl/quickjs-wasmfile-release-asyncify": "0.25.1", + "@jitl/quickjs-wasmfile-release-sync": "0.25.1", + "quickjs-emscripten-core": "0.25.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/quickjs-emscripten-core": { + "version": "0.25.1", + "resolved": "file:../../build/tar/quickjs-emscripten-core.tgz", + "integrity": "sha512-rKO+bEkTA98HAZTxceGgLExU2IOBA3e2mCpLfBxlFMYZ4PbRFbW9P9zzrAq08E82/+srptWuqQEqKCrfMwqlBw==", + "license": "MIT", + "dependencies": { + "@jitl/quickjs-ffi-types": "0.25.1" + } + } + } +} diff --git a/examples/deno/package.json b/examples/deno/package.json new file mode 100644 index 00000000..bd98f2be --- /dev/null +++ b/examples/deno/package.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "@jitl/quickjs-ffi-types": "file:../../build/tar/@jitl-quickjs-ffi-types.tgz", + "@jitl/quickjs-wasmfile-debug-asyncify": "file:../../build/tar/@jitl-quickjs-wasmfile-debug-asyncify.tgz", + "@jitl/quickjs-wasmfile-debug-sync": "file:../../build/tar/@jitl-quickjs-wasmfile-debug-sync.tgz", + "@jitl/quickjs-wasmfile-release-asyncify": "file:../../build/tar/@jitl-quickjs-wasmfile-release-asyncify.tgz", + "@jitl/quickjs-wasmfile-release-sync": "file:../../build/tar/@jitl-quickjs-wasmfile-release-sync.tgz", + "quickjs-emscripten": "file:../../build/tar/quickjs-emscripten.tgz", + "quickjs-emscripten-core": "file:../../build/tar/quickjs-emscripten-core.tgz" + } +} diff --git a/examples/node-minimal/main.mjs b/examples/node-minimal/main.mjs new file mode 100644 index 00000000..866cefa0 --- /dev/null +++ b/examples/node-minimal/main.mjs @@ -0,0 +1,2 @@ +import { QuickJS } from "./quickjs.mjs" +console.log(QuickJS.evalCode("1 + 1")) diff --git a/examples/node-minimal/package-lock.json b/examples/node-minimal/package-lock.json new file mode 100644 index 00000000..55359de7 --- /dev/null +++ b/examples/node-minimal/package-lock.json @@ -0,0 +1,40 @@ +{ + "name": "quickjs-emscripten-minimal-smoketest", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "quickjs-emscripten-minimal-smoketest", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@jitl/quickjs-ffi-types": "file:../../build/tar/@jitl-quickjs-ffi-types.tgz", + "@jitl/quickjs-wasmfile-release-sync": "file:../../build/tar/@jitl-quickjs-wasmfile-release-sync.tgz", + "quickjs-emscripten-core": "file:../../build/tar/quickjs-emscripten-core.tgz" + } + }, + "node_modules/@jitl/quickjs-ffi-types": { + "version": "0.25.1", + "resolved": "file:../../build/tar/@jitl-quickjs-ffi-types.tgz", + "integrity": "sha512-PtyXxJxf8+7nLRvYk3DPEeIhceFaE0zaBbnzVw8L5iFqLAE7YbIxvtcyIjnpeE84dHFjvL3OLGz0YeAXwutbnw==" + }, + "node_modules/@jitl/quickjs-wasmfile-release-sync": { + "version": "0.25.1", + "resolved": "file:../../build/tar/@jitl-quickjs-wasmfile-release-sync.tgz", + "integrity": "sha512-ONGiWzUe6MWoJezanVgOWYTisjJu4iKZsHfgBprvtoqWDaU82tk8VWOIa42lQng2ch6T2XeZjZHVnCKSB9uydw==", + "dependencies": { + "@jitl/quickjs-ffi-types": "0.25.1" + } + }, + "node_modules/quickjs-emscripten-core": { + "version": "0.25.1", + "resolved": "file:../../build/tar/quickjs-emscripten-core.tgz", + "integrity": "sha512-rKO+bEkTA98HAZTxceGgLExU2IOBA3e2mCpLfBxlFMYZ4PbRFbW9P9zzrAq08E82/+srptWuqQEqKCrfMwqlBw==", + "license": "MIT", + "dependencies": { + "@jitl/quickjs-ffi-types": "0.25.1" + } + } + } +} diff --git a/examples/node-minimal/package.json b/examples/node-minimal/package.json new file mode 100644 index 00000000..9ab0cde3 --- /dev/null +++ b/examples/node-minimal/package.json @@ -0,0 +1,16 @@ +{ + "name": "quickjs-emscripten-minimal-smoketest", + "version": "1.0.0", + "type": "commonjs", + "main": "main.mjs", + "license": "MIT", + "private": true, + "scripts": { + "start": "node ./main.mjs" + }, + "dependencies": { + "@jitl/quickjs-ffi-types": "file:../../build/tar/@jitl-quickjs-ffi-types.tgz", + "@jitl/quickjs-wasmfile-release-sync": "file:../../build/tar/@jitl-quickjs-wasmfile-release-sync.tgz", + "quickjs-emscripten-core": "file:../../build/tar/quickjs-emscripten-core.tgz" + } +} diff --git a/examples/node-minimal/quickjs.mjs b/examples/node-minimal/quickjs.mjs new file mode 100644 index 00000000..74a3017d --- /dev/null +++ b/examples/node-minimal/quickjs.mjs @@ -0,0 +1,7 @@ +import { newQuickJSWASMModuleFromVariant } from "quickjs-emscripten-core" +import RELEASE_SYNC from "@jitl/quickjs-wasmfile-release-sync" + +/** + * Export the QuickJSWASMModule instance as a singleton. + */ +export const QuickJS = await newQuickJSWASMModuleFromVariant(RELEASE_SYNC) diff --git a/packages/internal-tsconfig/tsconfig.json b/packages/internal-tsconfig/tsconfig.json index bec1baf8..35616c24 100644 --- a/packages/internal-tsconfig/tsconfig.json +++ b/packages/internal-tsconfig/tsconfig.json @@ -11,7 +11,12 @@ "moduleResolution": "nodenext" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, "resolveJsonModule": true, - "lib": ["ES2020"] /* Specify library files to be included in the compilation. */, + /* Specify library files to be included in the compilation. */ + "lib": [ + "ES2020", + // Need DOM for WebAssembty.XYZ namespace + "DOM" + ], // "allowJs": true /* Allow javascript files to be compiled. */, // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ diff --git a/packages/quickjs-emscripten-core/README.md b/packages/quickjs-emscripten-core/README.md index 23f58fed..0751ef6c 100644 --- a/packages/quickjs-emscripten-core/README.md +++ b/packages/quickjs-emscripten-core/README.md @@ -72,48 +72,48 @@ const QuickJS = await newQuickJSWASMModuleFromVariant(variant) [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-debug-sync/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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 | sync | The default, normal build. Note that both variants support regular async functions. | -| 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | sync | The default, normal build. Note that both variants support regular async functions. | +| 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 | ### @jitl/quickjs-wasmfile-debug-asyncify [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | ### @jitl/quickjs-wasmfile-release-sync [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-sync/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| releaseMode | release | Optimized for performance; use when building/deploying your application. | -| syncMode | sync | The default, normal build. Note that both variants support regular async functions. | -| 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| releaseMode | release | Optimized for performance; use when building/deploying your application. | +| syncMode | sync | The default, normal build. Note that both variants support regular async functions. | +| 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 | ### @jitl/quickjs-wasmfile-release-asyncify [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md) | Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS. -| Variable | Setting | Description | -| ------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| releaseMode | release | Optimized for performance; use when building/deploying your application. | -| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| releaseMode | release | Optimized for performance; use when building/deploying your application. | +| 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | ### @jitl/quickjs-singlefile-cjs-debug-sync diff --git a/packages/quickjs-emscripten-core/src/errors.ts b/packages/quickjs-emscripten-core/src/errors.ts index 95418222..7a666e52 100644 --- a/packages/quickjs-emscripten-core/src/errors.ts +++ b/packages/quickjs-emscripten-core/src/errors.ts @@ -36,3 +36,7 @@ export class QuickJSAsyncifySuspended extends Error { export class QuickJSMemoryLeakDetected extends Error { name = "QuickJSMemoryLeakDetected" } + +export class QuickJSEmscriptenModuleError extends Error { + name = "QuickJSEmscriptenModuleError" +} diff --git a/packages/quickjs-emscripten-core/src/from-variant.ts b/packages/quickjs-emscripten-core/src/from-variant.ts index 3cbd7620..2863783a 100644 --- a/packages/quickjs-emscripten-core/src/from-variant.ts +++ b/packages/quickjs-emscripten-core/src/from-variant.ts @@ -1,9 +1,18 @@ -import type { QuickJSSyncVariant, QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" +import type { + QuickJSSyncVariant, + QuickJSAsyncVariant, + QuickJSVariant, + EmscriptenModuleLoaderOptions, + SourceMapData, + QuickJSEmscriptenExtensions, +} from "@jitl/quickjs-ffi-types" import type { QuickJSWASMModule } from "./module.js" import type { QuickJSAsyncWASMModule } from "./module-asyncify.js" +import { QuickJSEmscriptenModuleError } from "./errors.js" +import { debugLog } from "./debug.js" // Otherwise we have build errors? -export { QuickJSSyncVariant, QuickJSAsyncVariant } +export { QuickJSSyncVariant, QuickJSAsyncVariant, QuickJSVariant } export type PromisedDefault = | T @@ -104,3 +113,197 @@ function smartUnwrap(val: T | { default: T } | { default: { de } return val as T } + +export type OrLoader = T | (() => Promise) + +export interface CustomizeVariantOptions { + /** If given, Emscripten will try to load the WebAssembly module data from this location (path or URI) as appropriate for the current platform. */ + wasmLocation?: string + /** If given, Emscripten will compile the WebAssembly.Module from these bytes. */ + wasmBinary?: OrLoader + /** If given, Emscripten will instantiate the WebAssembly.Instance from this existing WebAssembly.Module */ + wasmModule?: OrLoader + /** If given, Emscripten will try to load the source map for the WebAssembly module from this location (path or URI) as appropriate for the current platform. */ + wasmSourceMapLocation?: string + /** If given, we will provide the source map to Emscripten directly. This may only be respected if wasmModule is also provided. */ + wasmSourceMapData?: OrLoader + /** + * If set, this method will be called when the runtime needs to load a file, + * such as a .wasm WebAssembly file, .mem memory init file, or a file + * generated by the file packager. + * + * The function receives two parameters: + * + * - `fileName`, the relative path to the file as configured in build + * process, eg `"emscripten-module.wasm"`. + * - `prefix` (path to the main JavaScript file’s directory). This may be `''` + * (empty string) in some cases if the Emscripten Javascript code can't locate + * itself. Try logging it in your environment. + * + * It should return the actual URI or path to the requested file. + * + * This lets you host file packages on a different location than the directory + * of the JavaScript file (which is the default expectation), for example if + * you want to host them on a CDN. + */ + locateFile?: EmscriptenModuleLoaderOptions["locateFile"] + /** The enumerable properties of this object will be passed verbatim, although they may be overwritten if you pass other options. */ + emscriptenModule?: EmscriptenModuleLoaderOptions + /** Debug logger */ + log?: typeof console.log +} + +/** + * Create a new variant by overriding how Emscripten obtains the WebAssembly module. + * This may be necessary in Cloudflare Workers, which can't compile WebAssembly modules from binary data. + */ +export function newVariant( + baseVariant: T, + options: CustomizeVariantOptions, +): T { + const variant: T = { + ...baseVariant, + async importModuleLoader() { + const moduleLoader = smartUnwrap(await baseVariant.importModuleLoader()) + return async function newModuleLoader() { + const moduleLoaderArg: EmscriptenModuleLoaderOptions = options.emscriptenModule + ? { ...options.emscriptenModule } + : {} + const log = + options.log ?? ((...args: unknown[]) => debugLog("newVariant moduleLoader:", ...args)) + const tapValue = (message: unknown[], val: T) => { + log(...message, val) + return val + } + + const force = (val: OrLoader | undefined): T | undefined | Promise => { + if (typeof val === "function") { + return (val as () => Promise)() + } + return val + } + + if (options.wasmLocation || options.wasmSourceMapLocation || options.locateFile) { + moduleLoaderArg.locateFile = (fileName: string, relativeTo: string) => { + const args = { fileName, relativeTo } + if (fileName.endsWith(".wasm") && options.wasmLocation !== undefined) { + return tapValue( + ["locateFile .wasm: provide wasmLocation", args], + options.wasmLocation, + ) + } + + if (fileName.endsWith(".map")) { + if (options.wasmSourceMapLocation !== undefined) { + return tapValue( + ["locateFile .map: provide wasmSourceMapLocation", args], + options.wasmSourceMapLocation, + ) + } + + if (options.wasmLocation && !options.locateFile) { + return tapValue( + ["locateFile .map: infer from wasmLocation", args], + options.wasmLocation + ".map", + ) + } + } + + if (options.locateFile) { + return tapValue( + ["locateFile: use provided fn", args], + options.locateFile(fileName, relativeTo), + ) + } + + return tapValue(["locateFile: unhandled, passthrough", args], fileName) + } + } + + if (options.wasmBinary) { + moduleLoaderArg.wasmBinary = await force(options.wasmBinary) + } + + const optionsWasmModule = options.wasmModule + let modulePromise: Promise | undefined + if (optionsWasmModule) { + moduleLoaderArg.instantiateWasm = async (imports, onSuccess) => { + modulePromise ??= Promise.resolve(force(optionsWasmModule)) + const wasmModule = await modulePromise + if (!wasmModule) { + // This should never happen + throw new QuickJSEmscriptenModuleError( + `options.wasmModule returned ${String(wasmModule)}`, + ) + } + const instance = await WebAssembly.instantiate(wasmModule, imports) + onSuccess(instance) + return instance.exports + } + } + + moduleLoaderArg.monitorRunDependencies = (left: number) => { + log("monitorRunDependencies:", left) + } + + // This will be replaced with the actual function by --pre-js + // Having the mock around makes our code simpler gives us handy logging + // if we need to understand any issues + moduleLoaderArg.quickjsEmscriptenInit = () => newMockExtensions(log) + + const resultPromise = moduleLoader(moduleLoaderArg) + const extensions = moduleLoaderArg.quickjsEmscriptenInit?.(log) + if ( + optionsWasmModule && + extensions?.receiveWasmOffsetConverter && + !extensions.existingWasmOffsetConverter + ) { + // Unlikely to be available, we'll usually end up mocking this. + // Still if the user has both, we'll take it. + const wasmBinary = (await force(options.wasmBinary)) ?? new ArrayBuffer(0) + + modulePromise ??= Promise.resolve(force(optionsWasmModule)) + const wasmModule = await modulePromise + if (!wasmModule) { + // This should never happen + throw new QuickJSEmscriptenModuleError( + `options.wasmModule returned ${String(wasmModule)}`, + ) + } + extensions.receiveWasmOffsetConverter(wasmBinary, wasmModule) + } + + if (extensions?.receiveSourceMapJSON) { + const loadedSourceMapData = await force(options.wasmSourceMapData) + if (typeof loadedSourceMapData === "string") { + extensions.receiveSourceMapJSON(JSON.parse(loadedSourceMapData)) + } else if (loadedSourceMapData) { + extensions.receiveSourceMapJSON(loadedSourceMapData) + } else { + extensions.receiveSourceMapJSON({ version: 3, names: [], sources: [], mappings: "" }) + } + } + + return resultPromise + } + }, + } + return variant +} + +function newMockExtensions(log: typeof console.log): QuickJSEmscriptenExtensions { + const mockMessage = `mock called, emscripten module may not be initialized yet` + return { + mock: true, + removeRunDependency(name: string) { + log(`${mockMessage}: removeRunDependency called:`, name) + }, + receiveSourceMapJSON(data: unknown) { + log(`${mockMessage}: receiveSourceMapJSON called:`, data) + }, + WasmOffsetConverter: undefined, + receiveWasmOffsetConverter(bytes: ArrayBuffer, mod: WebAssembly.Module) { + log(`${mockMessage}: receiveWasmOffsetConverter called:`, bytes, mod) + }, + } +} diff --git a/packages/quickjs-ffi-types/src/emscripten-types.ts b/packages/quickjs-ffi-types/src/emscripten-types.ts index 6fd77c04..64bc3751 100644 --- a/packages/quickjs-ffi-types/src/emscripten-types.ts +++ b/packages/quickjs-ffi-types/src/emscripten-types.ts @@ -41,13 +41,89 @@ declare namespace Emscripten { interface CCallOpts { async?: boolean } + + class WasmOffsetConverter { + constructor(wasmBytes: ArrayBuffer, wasmModule: WebAssembly.Module) + convert(funcidx: number, offset: number): number + getIndex(offset: number): number + isSameFunc(offset1: number, offset2: number): boolean + getName(offset: number): string + } +} + +export interface SourceMapData { + version: number + sources: string[] + names: string[] + mappings: string +} + +/** @private */ +export interface QuickJSEmscriptenExtensions { + mock?: boolean + removeRunDependency?(name: string): void + receiveSourceMapJSON?(data: SourceMapData): void + WasmOffsetConverter?: typeof Emscripten.WasmOffsetConverter + existingWasmOffsetConverter?: Emscripten.WasmOffsetConverter + receiveWasmOffsetConverter?(bytes: ArrayBuffer, mod: WebAssembly.Module): void +} + +/** + * This structure is defined by Emscripten. + * It's possible to provide these parameters to an emscripten module loader. + * See [the Emscripten Module API reference](https://emscripten.org/docs/api_reference/module.html). + */ +export interface EmscriptenModuleLoaderOptions { + /** + * If set, this method will be called when the runtime needs to load a file, + * such as a .wasm WebAssembly file, .mem memory init file, or a file + * generated by the file packager. + * + * The function receives two parameters: + * + * - `fileName`, the relative path to the file as configured in build + * process, eg `"emscripten-module.wasm"`. + * - `prefix` (path to the main JavaScript file’s directory). This may be `''` + * (empty string) in some cases if the Emscripten Javascript code can't locate + * itself. Try logging it in your environment. + * + * It should return the actual URI or path to the requested file. + * + * This lets you host file packages on a different location than the directory + * of the JavaScript file (which is the default expectation), for example if + * you want to host them on a CDN. + */ + locateFile?( + fileName: "emscripten-module.wasm" | "emscripten-module.wasm.map" | string, + /** Often `''` (empty string) */ + prefix: string, + ): string + + /** Compile this to WebAssembly.Module */ + wasmBinary?: ArrayBuffer + + /** Create an instance of the WASM module, call onSuccess(instance), then return instance.exports */ + instantiateWasm?( + imports: WebAssembly.Imports, + onSuccess: (instance: WebAssembly.Instance) => void, + ): WebAssembly.Exports | Promise + + /** Called by emscripten as dependencies blocking initialization are added or fulfilled. May only be called in debug builds. */ + monitorRunDependencies?(left: number): void + + /** + * Emscripten may mutate the loader options object to contain this function. + * It's added in our --pre-js / pre.js file, and used by custom variant loaders. + * @private + */ + quickjsEmscriptenInit?(log: typeof console.log): QuickJSEmscriptenExtensions } /** * Typings for the features we use to interface with our Emscripten build of * QuickJS. */ -export interface EmscriptenModule { +export interface EmscriptenModule extends EmscriptenModuleLoaderOptions { // No longer needed: // addFunction(fn: Function, type: string): number // removeFunction(pointer: number): void @@ -166,5 +242,5 @@ export interface QuickJSAsyncEmscriptenModule extends EmscriptenModule { export type EitherModule = QuickJSEmscriptenModule | QuickJSAsyncEmscriptenModule export interface EmscriptenModuleLoader { - (): Promise + (options?: EmscriptenModuleLoaderOptions): Promise } diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile index 7fb83eea..dcb4048b 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/Makefile @@ -77,6 +77,9 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_WASM+=-s ASYNCIFY_ADVISE=1 CFLAGS_WASM+=-O3 @@ -84,6 +87,7 @@ CFLAGS_WASM+=-O3 CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true GENERATE_TS_ENV+=DEBUG=true @@ -108,6 +112,7 @@ EXPORTS: BROWSER CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -120,20 +125,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md b/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md index 126b23b3..0f11d464 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/README.md @@ -69,6 +69,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-s ASYNCIFY_ADVISE=1", "-O3" diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile index ed92d4e5..12079667 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/Makefile @@ -70,6 +70,9 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak @@ -78,6 +81,7 @@ CFLAGS_WASM+=-g2 CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=DEBUG=true @@ -101,6 +105,7 @@ EXPORTS: BROWSER CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -113,20 +118,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/README.md b/packages/variant-quickjs-singlefile-browser-debug-sync/README.md index 8e467cf8..3bc4eea8 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/README.md +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/README.md @@ -62,6 +62,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", diff --git a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile index f2b4de84..72670a33 100644 --- a/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-asyncify/Makefile @@ -82,6 +82,7 @@ CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true @@ -105,6 +106,7 @@ EXPORTS: BROWSER CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -117,20 +119,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile index d758dd43..d583cb7f 100644 --- a/packages/variant-quickjs-singlefile-browser-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-browser-release-sync/Makefile @@ -75,6 +75,7 @@ CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker + # GENERATE_TS options - variant specific @@ -98,6 +99,7 @@ EXPORTS: BROWSER CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -110,20 +112,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile index cd4f4708..1399e538 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/Makefile @@ -77,6 +77,9 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_WASM+=-s ASYNCIFY_ADVISE=1 CFLAGS_WASM+=-O3 @@ -84,6 +87,7 @@ CFLAGS_CJS+=-s ENVIRONMENT=web,worker,node + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true GENERATE_TS_ENV+=DEBUG=true @@ -108,6 +112,7 @@ EXPORTS: CJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -120,20 +125,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md index 73bbd8ab..638699d0 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/README.md @@ -69,6 +69,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-s ASYNCIFY_ADVISE=1", "-O3" diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile index 18b5e8d2..13d6aaef 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/Makefile @@ -70,6 +70,9 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak @@ -78,6 +81,7 @@ CFLAGS_CJS+=-s ENVIRONMENT=web,worker,node + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=DEBUG=true @@ -101,6 +105,7 @@ EXPORTS: CJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -113,20 +118,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md b/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md index bb1d37bf..4397341d 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/README.md @@ -62,6 +62,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", diff --git a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile index 6ee2c92f..36c0dcab 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-asyncify/Makefile @@ -82,6 +82,7 @@ CFLAGS_CJS+=-s ENVIRONMENT=web,worker,node + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true @@ -105,6 +106,7 @@ EXPORTS: CJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -117,20 +119,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile index d5a694b5..3553f07f 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-cjs-release-sync/Makefile @@ -75,6 +75,7 @@ CFLAGS_CJS+=-s ENVIRONMENT=web,worker,node + # GENERATE_TS options - variant specific @@ -98,6 +99,7 @@ EXPORTS: CJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -110,20 +112,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile index 78557622..0ddb6afa 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/Makefile @@ -77,6 +77,9 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_WASM+=-s ASYNCIFY_ADVISE=1 CFLAGS_WASM+=-O3 @@ -84,6 +87,7 @@ CFLAGS_WASM+=-O3 CFLAGS_MJS+=-s ENVIRONMENT=node + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true GENERATE_TS_ENV+=DEBUG=true @@ -108,6 +112,7 @@ EXPORTS: MJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -120,20 +125,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md index 424a9a36..34d68448 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/README.md @@ -69,6 +69,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-s ASYNCIFY_ADVISE=1", "-O3" diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile index 74166103..2b768316 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/Makefile @@ -70,6 +70,9 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak @@ -78,6 +81,7 @@ CFLAGS_WASM+=-g2 CFLAGS_MJS+=-s ENVIRONMENT=node + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=DEBUG=true @@ -101,6 +105,7 @@ EXPORTS: MJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -113,20 +118,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md b/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md index b8a579c2..bd2a37f8 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/README.md @@ -62,6 +62,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s SINGLE_FILE=1", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", diff --git a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile index 7763f1f0..9d6bc7f5 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-asyncify/Makefile @@ -82,6 +82,7 @@ CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_MJS+=-s ENVIRONMENT=node + # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true @@ -105,6 +106,7 @@ EXPORTS: MJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -117,20 +119,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile index aaa31c0b..b782ff4c 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile +++ b/packages/variant-quickjs-singlefile-mjs-release-sync/Makefile @@ -75,6 +75,7 @@ CFLAGS_WASM+=-s SINGLE_FILE=1 CFLAGS_MJS+=-s ENVIRONMENT=node + # GENERATE_TS options - variant specific @@ -98,6 +99,7 @@ EXPORTS: MJS CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -110,20 +112,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile index 5e219eba..ee2c28b3 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/Makefile @@ -77,11 +77,15 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-s ASYNCIFY_ADVISE=1 CFLAGS_WASM+=-O3 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker +CFLAGS_CLOUDFLARE+=-s ENVIRONMENT=web # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true @@ -103,10 +107,11 @@ clean: ############################################################################### # Emscripten output targets -EXPORTS: BROWSER MJS CJS +EXPORTS: BROWSER MJS CJS CLOUDFLARE CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -119,20 +124,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/README.md b/packages/variant-quickjs-wasmfile-debug-asyncify/README.md index 4608b321..bb24059e 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/README.md +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/README.md @@ -21,13 +21,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? Yes @@ -57,6 +58,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } @@ -77,6 +81,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-s ASYNCIFY_ADVISE=1", "-O3" ] diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/package.json b/packages/variant-quickjs-wasmfile-debug-asyncify/package.json index c3d504d0..07035aae 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/package.json +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/package.json @@ -45,6 +45,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts b/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts index 16022d1c..faec7fc0 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts @@ -11,7 +11,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * | 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | + * | exports | require import browser workerd | Has these package.json export conditions | * */ const variant: QuickJSAsyncVariant = { diff --git a/packages/variant-quickjs-wasmfile-debug-sync/Makefile b/packages/variant-quickjs-wasmfile-debug-sync/Makefile index 8396d00f..f76e64f6 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-debug-sync/Makefile @@ -70,12 +70,16 @@ CFLAGS_WASM+=-O0 CFLAGS_WASM+=-DQTS_DEBUG_MODE CFLAGS_WASM+=-gsource-map CFLAGS_WASM+=-s ASSERTIONS=1 +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-extension.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-sourceMapJson.js +CFLAGS_WASM+=--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js CFLAGS_WASM+=-DQTS_SANITIZE_LEAK CFLAGS_WASM+=-fsanitize=leak CFLAGS_WASM+=-g2 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker +CFLAGS_CLOUDFLARE+=-s ENVIRONMENT=web # GENERATE_TS options - variant specific GENERATE_TS_ENV+=DEBUG=true @@ -96,10 +100,11 @@ clean: ############################################################################### # Emscripten output targets -EXPORTS: BROWSER MJS CJS +EXPORTS: BROWSER MJS CJS CLOUDFLARE CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -112,20 +117,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-wasmfile-debug-sync/README.md b/packages/variant-quickjs-wasmfile-debug-sync/README.md index ec5468d5..ab95a7c2 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/README.md +++ b/packages/variant-quickjs-wasmfile-debug-sync/README.md @@ -21,13 +21,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? No @@ -57,6 +58,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } @@ -70,6 +74,9 @@ Variant-specific Emscripten build flags: "-DQTS_DEBUG_MODE", "-gsource-map", "-s ASSERTIONS=1", + "--pre-js $(TEMPLATES)/pre-extension.js", + "--pre-js $(TEMPLATES)/pre-sourceMapJson.js", + "--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js", "-DQTS_SANITIZE_LEAK", "-fsanitize=leak", "-g2" diff --git a/packages/variant-quickjs-wasmfile-debug-sync/package.json b/packages/variant-quickjs-wasmfile-debug-sync/package.json index 2a04db52..ac4d50c5 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/package.json +++ b/packages/variant-quickjs-wasmfile-debug-sync/package.json @@ -45,6 +45,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", diff --git a/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts b/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts index 0d78d1cd..3a36108c 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts +++ b/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts @@ -11,7 +11,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * | 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 | sync | The default, normal build. Note that both variants support regular async functions. | * | 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 | Has these package.json export conditions | + * | exports | require import browser workerd | Has these package.json export conditions | * */ const variant: QuickJSSyncVariant = { diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile index eb66f4e4..789d6ef7 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/Makefile +++ b/packages/variant-quickjs-wasmfile-release-asyncify/Makefile @@ -80,6 +80,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker +CFLAGS_CLOUDFLARE+=-s ENVIRONMENT=web # GENERATE_TS options - variant specific GENERATE_TS_ENV+=ASYNCIFY=true @@ -100,10 +101,11 @@ clean: ############################################################################### # Emscripten output targets -EXPORTS: BROWSER MJS CJS +EXPORTS: BROWSER MJS CJS CLOUDFLARE CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -116,20 +118,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/README.md b/packages/variant-quickjs-wasmfile-release-asyncify/README.md index 40a7aed3..564742a0 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/README.md +++ b/packages/variant-quickjs-wasmfile-release-asyncify/README.md @@ -21,13 +21,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Optimized for performance; use when building/deploying your application. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? Yes @@ -57,6 +58,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/package.json b/packages/variant-quickjs-wasmfile-release-asyncify/package.json index da445067..b18c45fa 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/package.json +++ b/packages/variant-quickjs-wasmfile-release-asyncify/package.json @@ -45,6 +45,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts b/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts index 2dab9536..c9788755 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts +++ b/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts @@ -11,7 +11,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * | releaseMode | release | Optimized for performance; use when building/deploying your application. | * | 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](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) 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 | Has these package.json export conditions | + * | exports | require import browser workerd | Has these package.json export conditions | * */ const variant: QuickJSAsyncVariant = { diff --git a/packages/variant-quickjs-wasmfile-release-sync/Makefile b/packages/variant-quickjs-wasmfile-release-sync/Makefile index 878d4e39..aaea3bb2 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/Makefile +++ b/packages/variant-quickjs-wasmfile-release-sync/Makefile @@ -73,6 +73,7 @@ CFLAGS_WASM+=-s FILESYSTEM=0 CFLAGS_CJS+=-s ENVIRONMENT=node CFLAGS_MJS+=-s ENVIRONMENT=node CFLAGS_BROWSER+=-s ENVIRONMENT=web,worker +CFLAGS_CLOUDFLARE+=-s ENVIRONMENT=web # GENERATE_TS options - variant specific @@ -93,10 +94,11 @@ clean: ############################################################################### # Emscripten output targets -EXPORTS: BROWSER MJS CJS +EXPORTS: BROWSER MJS CJS CLOUDFLARE CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -109,20 +111,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/packages/variant-quickjs-wasmfile-release-sync/README.md b/packages/variant-quickjs-wasmfile-release-sync/README.md index 3028d5d2..933d2315 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/README.md +++ b/packages/variant-quickjs-wasmfile-release-sync/README.md @@ -21,13 +21,14 @@ The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Optimized for performance; use when building/deploying your application. -## Exports: require import browser +## Exports: require import browser workerd Exports the following in package.json for the package entrypoint: - Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule. - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module. - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments. +- Targets Cloudflare Workers. ## Extra async magic? No @@ -57,6 +58,9 @@ Full variant JSON description: }, "browser": { "emscriptenEnvironment": ["web", "worker"] + }, + "workerd": { + "emscriptenEnvironment": ["web"] } } } diff --git a/packages/variant-quickjs-wasmfile-release-sync/package.json b/packages/variant-quickjs-wasmfile-release-sync/package.json index d409bc7e..7680479b 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/package.json +++ b/packages/variant-quickjs-wasmfile-release-sync/package.json @@ -45,6 +45,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", diff --git a/packages/variant-quickjs-wasmfile-release-sync/src/index.ts b/packages/variant-quickjs-wasmfile-release-sync/src/index.ts index 058c7db4..42406678 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/src/index.ts +++ b/packages/variant-quickjs-wasmfile-release-sync/src/index.ts @@ -11,7 +11,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * | releaseMode | release | Optimized for performance; use when building/deploying your application. | * | syncMode | sync | The default, normal build. Note that both variants support regular async functions. | * | 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 | Has these package.json export conditions | + * | exports | require import browser workerd | Has these package.json export conditions | * */ const variant: QuickJSSyncVariant = { diff --git a/scripts/helpers.ts b/scripts/helpers.ts index 25d79e6e..062acc40 100644 --- a/scripts/helpers.ts +++ b/scripts/helpers.ts @@ -40,41 +40,34 @@ export function exec(command: string) { } class InstallFlow { - steps: Array<() => void> = [] + removed = new Set() + added = new Set() constructor( public into: string, - public commands: { install: string; remove: string }, + public commands: { install: string; remove: string; fromRegistry: boolean }, ) {} add(packageName: string) { - const removed = new Set() - const added = new Set() this.visit(packageName, { after: (pkg) => { - removed.add(pkg.name) + this.removed.add(pkg.name) }, }) - this.steps.push(() => - exec(`cd ${this.into} && ${this.commands.remove} ${[...removed].join(" ")}`), - ) this.visit(packageName, { after: (pkg) => { - if (INSTALL_FROM_REGISTRY) { + if (this.commands.fromRegistry) { if (pkg.name === packageName) { - added.add(`${pkg.name}@${pkg.version}`) + this.added.add(`${pkg.name}@${pkg.version}`) } return } const tarFile = getTarFile(pkg.name) - added.add(`${pkg.name}@${tarFile}`) + this.added.add(`${pkg.name}@${tarFile}`) }, }) - this.steps.push(() => - exec(`cd ${this.into} && ${this.commands.install} ${[...added].join(" ")}`), - ) return this } @@ -92,24 +85,35 @@ class InstallFlow { } run() { - for (const step of this.steps) { - step() + if (this.removed.size > 0) { + exec(`cd ${this.into} && ${this.commands.remove} ${[...this.removed].join(" ")}`) + } + + if (this.added.size > 0) { + exec(`cd ${this.into} && ${this.commands.install} ${[...this.added].join(" ")}`) } } } export function installDependencyGraphFromTar( into: string, - packageName: string, + packageNameOrNames: string | string[], cmds: { install: string remove: string + fromRegistry: boolean } = { install: "npm install", remove: "npm remove", + fromRegistry: INSTALL_FROM_REGISTRY, }, ) { - new InstallFlow(into, cmds).add(packageName).run() + const packageNames = Array.isArray(packageNameOrNames) ? packageNameOrNames : [packageNameOrNames] + const flow = new InstallFlow(into, cmds) + for (const packageName of packageNames) { + flow.add(packageName) + } + flow.run() } export function resolve(...parts: string[]) { @@ -178,6 +182,7 @@ export interface PackageJson { browser?: string module?: string iife?: string + workerd?: string import: string | undefined require: string | undefined default: string | undefined diff --git a/scripts/prepareVariants.ts b/scripts/prepareVariants.ts index 1b6c8480..f33b580c 100755 --- a/scripts/prepareVariants.ts +++ b/scripts/prepareVariants.ts @@ -59,6 +59,9 @@ interface BuildVariant { require?: { emscriptenEnvironment: EmscriptenEnvironment[] } + workerd?: { + emscriptenEnvironment: EmscriptenEnvironment[] + } } } @@ -72,6 +75,11 @@ const SEPARATE_FILE_INCLUSION: BuildVariant["exports"] = { browser: { emscriptenEnvironment: [EmscriptenEnvironment.web, EmscriptenEnvironment.worker], }, + workerd: { + // note: EmscriptenEnvironment.worker is broken in Cloudflare Workers + // see https://github.com/cloudflare/worker-emscripten-template/blob/master/pre.js + emscriptenEnvironment: [EmscriptenEnvironment.web], + }, } const buildMatrix = { @@ -163,7 +171,15 @@ const SyncModeFlags = { const ReleaseModeFlags = { [ReleaseMode.Release]: [`-Oz`, `-flto`, `--closure 1`, `-s FILESYSTEM=0`], - [ReleaseMode.Debug]: [`-O0`, "-DQTS_DEBUG_MODE", `-gsource-map`, `-s ASSERTIONS=1`], + [ReleaseMode.Debug]: [ + `-O0`, + "-DQTS_DEBUG_MODE", + `-gsource-map`, + `-s ASSERTIONS=1`, + `--pre-js $(TEMPLATES)/pre-extension.js`, + `--pre-js $(TEMPLATES)/pre-sourceMapJson.js`, + `--pre-js $(TEMPLATES)/pre-wasmOffsetConverter.js`, + ], } const EmscriptenInclusionFlags = { @@ -205,7 +221,9 @@ function getExportCflags(variant: BuildVariant, exportName: keyof BuildVariant[" } const emscriptenEnvironment = exportVariant.emscriptenEnvironment.join(",") - return [`-s ENVIRONMENT=${emscriptenEnvironment}`] + const flags = [`-s ENVIRONMENT=${emscriptenEnvironment}`] + + return flags } function getGenerateTsEnv(targetName: string, variant: BuildVariant): Record { @@ -352,6 +370,9 @@ async function main() { ? "./dist/emscripten-module.browser.d.ts" : "./dist/emscripten-module.d.ts", iife: variant.exports.require ? "./dist/emscripten-module.cjs" : undefined, + workerd: variant.exports.workerd + ? "./dist/emscripten-module.cloudflare.cjs" + : undefined, browser: variant.exports.browser ? "./dist/emscripten-module.browser.mjs" : undefined, import: variant.exports.import ? "./dist/emscripten-module.mjs" @@ -459,6 +480,7 @@ const describeExport = { browser: `Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments.`, require: `Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule.`, import: `Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module.`, + workerd: `Targets Cloudflare Workers.`, } function renderCoreReadme(variantDescriptions: string[]): string { @@ -604,6 +626,11 @@ function renderMakefile(targetName: string, variant: BuildVariant): string { appendEnvVars("CFLAGS_BROWSER", getExportCflags(variant, "browser")), ) + template.replace( + "CFLAGS_CLOUDFLARE=REPLACE_THIS", + appendEnvVars("CFLAGS_CLOUDFLARE", getExportCflags(variant, "workerd")), + ) + template.replace( "GENERATE_TS_ENV_VARIANT=REPLACE_THIS", appendEnvVars( @@ -626,6 +653,9 @@ function renderMakefile(targetName: string, variant: BuildVariant): string { if (variant.exports.require) { targets.push("CJS") } + if (variant.exports.workerd) { + targets.push("CLOUDFLARE") + } template.replace(/^EXPORTS: __REPLACE_THIS__/gm, `EXPORTS: ${targets.join(" ")}`) if (template.text.includes("REPLACE_THIS")) { diff --git a/scripts/smoketest-deno.ts b/scripts/smoketest-deno.ts new file mode 100755 index 00000000..48ea24d9 --- /dev/null +++ b/scripts/smoketest-deno.ts @@ -0,0 +1,10 @@ +#!/usr/bin/env -S npx tsx +import * as sh from "./helpers" + +const target = sh.resolve(__dirname, "../examples/deno") +sh.installDependencyGraphFromTar(target, "quickjs-emscripten", { + fromRegistry: true, + install: "npm install", + remove: "npm remove", +}) +sh.exec(`cd ${target} && ./main.ts`) diff --git a/scripts/smoketest-node-minimal.ts b/scripts/smoketest-node-minimal.ts new file mode 100755 index 00000000..48b8e995 --- /dev/null +++ b/scripts/smoketest-node-minimal.ts @@ -0,0 +1,9 @@ +#!/usr/bin/env -S npx tsx +import * as sh from "./helpers" + +const target = sh.resolve(__dirname, "../examples/node-minimal") +sh.installDependencyGraphFromTar(target, [ + "quickjs-emscripten-core", + "@jitl/quickjs-wasmfile-release-sync", +]) +sh.exec(`cd ${target} && node main.mjs`) diff --git a/templates/Variant.mk b/templates/Variant.mk index f6e623fb..f71b9249 100644 --- a/templates/Variant.mk +++ b/templates/Variant.mk @@ -70,6 +70,7 @@ CFLAGS_ALL=REPLACE_THIS CFLAGS_CJS=REPLACE_THIS CFLAGS_MJS=REPLACE_THIS CFLAGS_BROWSER=REPLACE_THIS +CFLAGS_CLOUDFLARE=REPLACE_THIS # GENERATE_TS options - variant specific GENERATE_TS_ENV_VARIANT=REPLACE_THIS @@ -94,6 +95,7 @@ EXPORTS: __REPLACE_THIS__ CJS: $(DIST)/emscripten-module.cjs $(DIST)/emscripten-module.d.ts MJS: $(DIST)/emscripten-module.mjs $(DIST)/emscripten-module.d.ts BROWSER: $(DIST)/emscripten-module.browser.mjs $(DIST)/emscripten-module.browser.d.ts +CLOUDFLARE: $(DIST)/emscripten-module.cloudflare.cjs $(DIST)/emscripten-module.cloudflare.d.ts $(DIST)/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_ESM) $(DIST)/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) @@ -106,20 +108,29 @@ $(DIST)/emscripten-module.cjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OB $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) $(DIST)/emscripten-module.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ $(DIST)/emscripten-module%.d.ts: $(TEMPLATES)/emscripten-module.$(SYNC).d.ts + $(MKDIRP) echo '// Generated from $<' > $@ cat $< >> $@ # Browser target needs intermediate build to avoid two copies of .wasm -$(DIST)/emscripten-module.browser.mjs: $(BUILD_WRAPPER)/browser/emscripten-module.mjs +$(DIST)/emscripten-module.%.mjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) + if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi + cp $< $@ + +$(DIST)/emscripten-module.%.cjs: $(BUILD_WRAPPER)/%/emscripten-module.js + $(MKDIRP) if [[ -e $(basename $<).wasm ]] ; then cp -v $(basename $<).wasm* $(dir $@); fi cp $< $@ -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: CFLAGS_WASM+=$(CFLAGS_BROWSER) -$(BUILD_WRAPPER)/browser/emscripten-module.mjs: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) +$(BUILD_WRAPPER)/browser/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_BROWSER) +$(BUILD_WRAPPER)/cloudflare/emscripten-module.js: CFLAGS_WASM+=$(CFLAGS_CLOUDFLARE) +$(BUILD_WRAPPER)/%/emscripten-module.js: $(BUILD_WRAPPER)/interface.o $(VARIANT_QUICKJS_OBJS) $(WASM_SYMBOLS) | $(EMCC_SRC) $(MKDIRP) $(EMCC) $(CFLAGS_WASM) $(WRAPPER_DEFINES) $(EMCC_EXPORTED_FUNCS) -o $@ $< $(VARIANT_QUICKJS_OBJS) diff --git a/templates/pre-extension.js b/templates/pre-extension.js new file mode 100644 index 00000000..526c7c37 --- /dev/null +++ b/templates/pre-extension.js @@ -0,0 +1,16 @@ +/* eslint-disable no-undef */ +// quickjs-emscripten code injected into emscripten-module.js +// We use this to expose and patch up issues with Emscripten's source map handling... +function quickjsEmscriptenInit(debugLog) { + const log = debugLog || function () {} + // Everything goes in a function so we can defer running until other variables + // are initialized in case they change. + const extension = { log } + for (const init of quickjsEmscriptenInit.inits) { + init(extension) + } + Module["quickJSEmscriptenExtensions"] = extension + return extension +} +quickjsEmscriptenInit.inits = [] +Module["quickjsEmscriptenInit"] = quickjsEmscriptenInit diff --git a/templates/pre-sourceMapJson.js b/templates/pre-sourceMapJson.js new file mode 100644 index 00000000..2ad14102 --- /dev/null +++ b/templates/pre-sourceMapJson.js @@ -0,0 +1,13 @@ +/* eslint-disable no-undef */ +quickjsEmscriptenInit.inits.push((extension) => { + if (typeof receiveSourceMapJSON !== "undefined") { + extension["receiveSourceMapJSON"] = (data) => { + if (typeof wasmSourceMap === "undefined") { + extension.log("receiveSourceMapJSON: received", data) + return receiveSourceMapJSON(data) + } else { + extension.log("receiveSourceMapJSON: already have data:", wasmSourceMap, "ignoring", data) + } + } + } +}) diff --git a/templates/pre-wasmOffsetConverter.js b/templates/pre-wasmOffsetConverter.js new file mode 100644 index 00000000..6722fcdd --- /dev/null +++ b/templates/pre-wasmOffsetConverter.js @@ -0,0 +1,26 @@ +/* eslint-disable no-undef */ +quickjsEmscriptenInit.inits.push((extension) => { + if (typeof WasmOffsetConverter !== "undefined") { + extension["WasmOffsetConverter"] = WasmOffsetConverter + // Expose function to receive WasmOffsetConverter, set to wasmOffsetConverter local variable + // if it exists + try { + // Check if wasmOffsetConverter variable exists. If it isn't defined, this + // will throw and we'll skip the rest of the branch. + extension["existingWasmOffsetConverter"] = wasmOffsetConverter + extension["receiveWasmOffsetConverter"] = function (wasmBinary, wasmModule) { + if (!wasmOffsetConverter) { + extension.log("wasmOffsetConverter set") + wasmOffsetConverter = new WasmOffsetConverter(wasmBinary, wasmModule) + } else { + extension.log("wasmOffsetConverter already set, ignored") + } + } + } catch (error) { + // Nothing. + extension["receiveWasmOffsetConverter"] = function () { + extension.log("wasmOffsetConverter variable not defined, this is a no-op") + } + } + } +}) diff --git a/variants.json b/variants.json index 3a0045d9..4b15698f 100644 --- a/variants.json +++ b/variants.json @@ -41,6 +41,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", @@ -59,7 +60,8 @@ "exports": { "require": { "emscriptenEnvironment": ["node"] }, "import": { "emscriptenEnvironment": ["node"] }, - "browser": { "emscriptenEnvironment": ["web", "worker"] } + "browser": { "emscriptenEnvironment": ["web", "worker"] }, + "workerd": { "emscriptenEnvironment": ["web"] } } } }, @@ -105,6 +107,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", @@ -123,7 +126,8 @@ "exports": { "require": { "emscriptenEnvironment": ["node"] }, "import": { "emscriptenEnvironment": ["node"] }, - "browser": { "emscriptenEnvironment": ["web", "worker"] } + "browser": { "emscriptenEnvironment": ["web", "worker"] }, + "workerd": { "emscriptenEnvironment": ["web"] } } } }, @@ -169,6 +173,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", @@ -187,7 +192,8 @@ "exports": { "require": { "emscriptenEnvironment": ["node"] }, "import": { "emscriptenEnvironment": ["node"] }, - "browser": { "emscriptenEnvironment": ["web", "worker"] } + "browser": { "emscriptenEnvironment": ["web", "worker"] }, + "workerd": { "emscriptenEnvironment": ["web"] } } } }, @@ -233,6 +239,7 @@ "./emscripten-module": { "types": "./dist/emscripten-module.browser.d.ts", "iife": "./dist/emscripten-module.cjs", + "workerd": "./dist/emscripten-module.cloudflare.cjs", "browser": "./dist/emscripten-module.browser.mjs", "import": "./dist/emscripten-module.mjs", "require": "./dist/emscripten-module.cjs", @@ -251,7 +258,8 @@ "exports": { "require": { "emscriptenEnvironment": ["node"] }, "import": { "emscriptenEnvironment": ["node"] }, - "browser": { "emscriptenEnvironment": ["web", "worker"] } + "browser": { "emscriptenEnvironment": ["web", "worker"] }, + "workerd": { "emscriptenEnvironment": ["web"] } } } },