From e63adab0deb8e9b349d5a68188fe4623e84a0b27 Mon Sep 17 00:00:00 2001 From: Jake Teton-Landis Date: Mon, 1 Jan 2024 18:59:32 -0800 Subject: [PATCH] update quickjs-ng docs --- README.md | 1 + .../README.md | 2 +- .../exports.md | 3 +- .../quickjs-ng-wasmfile-debug-sync/README.md | 2 +- .../quickjs-ng-wasmfile-debug-sync/exports.md | 3 +- .../README.md | 2 +- .../exports.md | 3 +- .../README.md | 2 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../exports.md | 3 +- .../quickjs-wasmfile-debug-sync/exports.md | 3 +- .../exports.md | 3 +- .../quickjs-wasmfile-release-sync/exports.md | 3 +- doc/README.md | 1 + doc/quickjs-emscripten-core/README.md | 44 ++++++++++++++----- doc/quickjs-emscripten/README.md | 1 + doc/quickjs-emscripten/exports.md | 12 +++-- package.json | 3 +- packages/quickjs-emscripten-core/README.md | 44 ++++++++++++++----- .../README.md | 2 +- .../src/index.ts | 1 + .../README.md | 2 +- .../src/index.ts | 1 + .../README.md | 2 +- .../src/index.ts | 1 + .../README.md | 2 +- .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + .../src/index.ts | 1 + scripts/prepareVariants.ts | 3 +- 56 files changed, 147 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 6d2efd61..70e8703c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ compiled to WebAssembly. - Create and manipulate values inside the QuickJS runtime ([more][values]). - Expose host functions to the QuickJS runtime ([more][functions]). - Execute synchronous code that uses asynchronous functions, with [asyncify][asyncify]. +- Supports browsers, NodeJS 16+, Deno, Bun, Cloudflare Workers. [Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] diff --git a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md index bc83605f..9d071160 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md @@ -28,7 +28,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: debug diff --git a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/exports.md b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/exports.md index b4a5ffe5..9dbcec43 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/exports.md +++ b/doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md b/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md index 0e2b6d30..7c8073d3 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md @@ -28,7 +28,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: debug diff --git a/doc/@jitl/quickjs-ng-wasmfile-debug-sync/exports.md b/doc/@jitl/quickjs-ng-wasmfile-debug-sync/exports.md index fca4cd6b..b9f942fe 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-debug-sync/exports.md +++ b/doc/@jitl/quickjs-ng-wasmfile-debug-sync/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md b/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md index e0a13c3d..91789cc6 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md @@ -28,7 +28,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: release diff --git a/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/exports.md b/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/exports.md index 7b3553c1..145c9be6 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/exports.md +++ b/doc/@jitl/quickjs-ng-wasmfile-release-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md b/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md index d54e00ea..ec36c1e2 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md +++ b/doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md @@ -28,7 +28,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: release diff --git a/doc/@jitl/quickjs-ng-wasmfile-release-sync/exports.md b/doc/@jitl/quickjs-ng-wasmfile-release-sync/exports.md index 5575622c..7d9a98a8 100644 --- a/doc/@jitl/quickjs-ng-wasmfile-release-sync/exports.md +++ b/doc/@jitl/quickjs-ng-wasmfile-release-sync/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/exports.md b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/exports.md index bf5dee2d..41f0310d 100644 --- a/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/exports.md +++ b/doc/@jitl/quickjs-singlefile-browser-debug-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a browser ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-browser-debug-sync/exports.md b/doc/@jitl/quickjs-singlefile-browser-debug-sync/exports.md index bc4abd72..ae3d777e 100644 --- a/doc/@jitl/quickjs-singlefile-browser-debug-sync/exports.md +++ b/doc/@jitl/quickjs-singlefile-browser-debug-sync/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a browser ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-browser-release-asyncify/exports.md b/doc/@jitl/quickjs-singlefile-browser-release-asyncify/exports.md index 8e842885..9a98ebea 100644 --- a/doc/@jitl/quickjs-singlefile-browser-release-asyncify/exports.md +++ b/doc/@jitl/quickjs-singlefile-browser-release-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a browser ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-browser-release-sync/exports.md b/doc/@jitl/quickjs-singlefile-browser-release-sync/exports.md index aca919fd..edcb6427 100644 --- a/doc/@jitl/quickjs-singlefile-browser-release-sync/exports.md +++ b/doc/@jitl/quickjs-singlefile-browser-release-sync/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a browser ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/exports.md b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/exports.md index 7920b006..6b6217b3 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/exports.md +++ b/doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-cjs-debug-sync/exports.md b/doc/@jitl/quickjs-singlefile-cjs-debug-sync/exports.md index ec7d8a3b..c7d6f6d0 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-debug-sync/exports.md +++ b/doc/@jitl/quickjs-singlefile-cjs-debug-sync/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-debug-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-debug-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/exports.md b/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/exports.md index aef50146..726b30d8 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/exports.md +++ b/doc/@jitl/quickjs-singlefile-cjs-release-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-cjs-release-sync/exports.md b/doc/@jitl/quickjs-singlefile-cjs-release-sync/exports.md index 637dec54..46e34ef6 100644 --- a/doc/@jitl/quickjs-singlefile-cjs-release-sync/exports.md +++ b/doc/@jitl/quickjs-singlefile-cjs-release-sync/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-release-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-cjs-release-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/exports.md b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/exports.md index 80a73416..d4aaffa6 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/exports.md +++ b/doc/@jitl/quickjs-singlefile-mjs-debug-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-mjs-debug-sync/exports.md b/doc/@jitl/quickjs-singlefile-mjs-debug-sync/exports.md index b182d6e7..6e6e992c 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-debug-sync/exports.md +++ b/doc/@jitl/quickjs-singlefile-mjs-debug-sync/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-debug-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-debug-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/exports.md b/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/exports.md index 7ace41a4..5ef18a31 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/exports.md +++ b/doc/@jitl/quickjs-singlefile-mjs-release-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-singlefile-mjs-release-sync/exports.md b/doc/@jitl/quickjs-singlefile-mjs-release-sync/exports.md index f7ac47b8..6f7d2d45 100644 --- a/doc/@jitl/quickjs-singlefile-mjs-release-sync/exports.md +++ b/doc/@jitl/quickjs-singlefile-mjs-release-sync/exports.md @@ -25,6 +25,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -32,7 +33,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-release-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-mjs-release-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md b/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md index 1af45a7f..e4ed77dc 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md +++ b/doc/@jitl/quickjs-wasmfile-debug-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md b/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md index 4edc11bf..40ba495b 100644 --- a/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md +++ b/doc/@jitl/quickjs-wasmfile-debug-sync/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md b/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md index 11918546..58c0a9a3 100644 --- a/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md +++ b/doc/@jitl/quickjs-wasmfile-release-asyncify/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts#L18) *** diff --git a/doc/@jitl/quickjs-wasmfile-release-sync/exports.md b/doc/@jitl/quickjs-wasmfile-release-sync/exports.md index 7838a375..f91055d1 100644 --- a/doc/@jitl/quickjs-wasmfile-release-sync/exports.md +++ b/doc/@jitl/quickjs-wasmfile-release-sync/exports.md @@ -25,6 +25,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -32,7 +33,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-release-sync/src/index.ts#L17) +[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-wasmfile-release-sync/src/index.ts#L18) *** diff --git a/doc/README.md b/doc/README.md index 4863faa1..2ae6e0fd 100644 --- a/doc/README.md +++ b/doc/README.md @@ -11,6 +11,7 @@ compiled to WebAssembly. - Create and manipulate values inside the QuickJS runtime ([more][values]). - Expose host functions to the QuickJS runtime ([more][functions]). - Execute synchronous code that uses asynchronous functions, with [asyncify][asyncify]. +- Supports browsers, NodeJS 16+, Deno, Bun, Cloudflare Workers. [Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] diff --git a/doc/quickjs-emscripten-core/README.md b/doc/quickjs-emscripten-core/README.md index 949173f8..8bebe065 100644 --- a/doc/quickjs-emscripten-core/README.md +++ b/doc/quickjs-emscripten-core/README.md @@ -104,6 +104,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -116,6 +117,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -128,6 +130,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -140,6 +143,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -150,12 +154,13 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-ng-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 workerd | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | +| 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-ng-wasmfile-debug-asyncify @@ -164,6 +169,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -174,12 +180,13 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-ng-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 workerd | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | +| 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-ng-wasmfile-release-asyncify @@ -188,6 +195,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -200,6 +208,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -212,6 +221,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -224,6 +234,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -236,6 +247,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -248,6 +260,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -260,6 +273,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -272,6 +286,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -284,6 +299,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -296,6 +312,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -308,6 +325,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -320,6 +338,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -332,6 +351,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/doc/quickjs-emscripten/README.md b/doc/quickjs-emscripten/README.md index f789720e..c38743fd 100644 --- a/doc/quickjs-emscripten/README.md +++ b/doc/quickjs-emscripten/README.md @@ -11,6 +11,7 @@ compiled to WebAssembly. - Create and manipulate values inside the QuickJS runtime ([more][values]). - Expose host functions to the QuickJS runtime ([more][functions]). - Execute synchronous code that uses asynchronous functions, with [asyncify][asyncify]. +- Supports browsers, NodeJS 16+, Deno, Bun, Cloudflare Workers. [Github] | [NPM] | [API Documentation][api] | [Variants][core] | [Examples][tests] diff --git a/doc/quickjs-emscripten/exports.md b/doc/quickjs-emscripten/exports.md index fbfbbdd9..0f042fea 100644 --- a/doc/quickjs-emscripten/exports.md +++ b/doc/quickjs-emscripten/exports.md @@ -767,6 +767,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -774,7 +775,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -packages/variant-quickjs-wasmfile-debug-asyncify/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-debug-asyncify/dist/index.d.ts:18 *** @@ -789,6 +790,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -796,7 +798,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -packages/variant-quickjs-wasmfile-debug-sync/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-debug-sync/dist/index.d.ts:18 *** @@ -1015,6 +1017,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -1022,7 +1025,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -packages/variant-quickjs-wasmfile-release-asyncify/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-release-asyncify/dist/index.d.ts:18 *** @@ -1037,6 +1040,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | -- | -- | -- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -1044,7 +1048,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C #### Source -packages/variant-quickjs-wasmfile-release-sync/dist/index.d.ts:17 +packages/variant-quickjs-wasmfile-release-sync/dist/index.d.ts:18 ## Functions diff --git a/package.json b/package.json index 923accfe..a6fb0252 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "smoketest-node": "yarn tarball && ./scripts/smoketest-node-minimal.ts && ./scripts/smoketest-node.ts", "smoketest-cra": "yarn tarball && ./scripts/smoketest-create-react-app.ts", "smoketest-vite": "yarn tarball && ./scripts/smoketest-vite.ts", + "smoketest-bun": "yarn tarball && ./scripts/smoketest-bun.ts", "check": "yarn build && yarn check:packages && yarn check:format && yarn check:types && yarn test && yarn lint", "test": "yarn for-each-package test", "test:fast": "TEST_NO_ASYNC=true yarn test", @@ -27,7 +28,7 @@ "check:types": "yarn for-each-package tsc", "check:format": "prettier --check .", "check:packages": "./scripts/check-packages-built.ts", - "check:smoketest": "yarn tarball && ./scripts/smoketest-node-minimal.ts && ./scripts/smoketest-node.ts && ./scripts/smoketest-create-react-app.ts && ./scripts/smoketest-vite.ts", + "check:smoketest": "yarn tarball && ./scripts/smoketest-node-minimal.ts && ./scripts/smoketest-node.ts && ./scripts/smoketest-create-react-app.ts && ./scripts/smoketest-vite.ts && ./scripts/smoketest-bun.ts", "lint": "npx eslint .", "fix": "yarn lint --fix ; yarn prettier > /dev/null", "build": "yarn build:codegen && yarn build:packages && yarn doc", diff --git a/packages/quickjs-emscripten-core/README.md b/packages/quickjs-emscripten-core/README.md index 6c0fd850..fc0d4760 100644 --- a/packages/quickjs-emscripten-core/README.md +++ b/packages/quickjs-emscripten-core/README.md @@ -74,6 +74,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -86,6 +87,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -98,6 +100,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -110,6 +113,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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. | @@ -120,12 +124,13 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-ng-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 workerd | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | +| 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-ng-wasmfile-debug-asyncify @@ -134,6 +139,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -144,12 +150,13 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-ng-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 workerd | Has these package.json export conditions | +| Variable | Setting | Description | +| ------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | +| 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-ng-wasmfile-release-asyncify @@ -158,6 +165,7 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C | Variable | Setting | Description | | ------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | | 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. | @@ -170,6 +178,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -182,6 +191,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -194,6 +204,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -206,6 +217,7 @@ Variant with the WASM data embedded into a universal (Node and Browser compatibl | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -218,6 +230,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -230,6 +243,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -242,6 +256,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -254,6 +269,7 @@ Variant with the WASM data embedded into a NodeJS ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -266,6 +282,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -278,6 +295,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -290,6 +308,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | @@ -302,6 +321,7 @@ Variant with the WASM data embedded into a browser ESModule. | Variable | Setting | Description | | ------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md index 74c60e50..98963602 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md +++ b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/README.md @@ -15,7 +15,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: debug diff --git a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts index bd39bb48..25efb7dc 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts +++ b/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | * | 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. | diff --git a/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md b/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md index cc2ab626..c1fc3cf7 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md +++ b/packages/variant-quickjs-ng-wasmfile-debug-sync/README.md @@ -15,7 +15,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: debug diff --git a/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts b/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts index 45921331..7e6b9798 100644 --- a/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts +++ b/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | * | 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. | diff --git a/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md b/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md index e302fe93..0c42654b 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md +++ b/packages/variant-quickjs-ng-wasmfile-release-asyncify/README.md @@ -15,7 +15,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: release diff --git a/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts b/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts index 6c0682d8..58c4dd16 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts +++ b/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | * | 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. | diff --git a/packages/variant-quickjs-ng-wasmfile-release-sync/README.md b/packages/variant-quickjs-ng-wasmfile-release-sync/README.md index 9e87dc2e..d2bcd857 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-sync/README.md +++ b/packages/variant-quickjs-ng-wasmfile-release-sync/README.md @@ -15,7 +15,7 @@ This variant was built with the following settings: ## Library: quickjs-ng -[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features. +[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. ## Release mode: release diff --git a/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts b/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts index c34e7ac3..d03cbb50 100644 --- a/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts +++ b/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs-ng | [quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten. | * | 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. | diff --git a/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts b/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts index e43aae99..dce26cbc 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts +++ b/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts b/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts index 3e086203..6502d3b4 100644 --- a/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts +++ b/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts b/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts index 3dd99e21..dab1d3c4 100644 --- a/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts +++ b/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts b/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts index 4e9182c6..5d2de1aa 100644 --- a/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts +++ b/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/index.ts b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/index.ts index f7719113..47cc021c 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/index.ts +++ b/packages/variant-quickjs-singlefile-cjs-debug-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-cjs-debug-sync/src/index.ts b/packages/variant-quickjs-singlefile-cjs-debug-sync/src/index.ts index ae2ca419..fb4c4f64 100644 --- a/packages/variant-quickjs-singlefile-cjs-debug-sync/src/index.ts +++ b/packages/variant-quickjs-singlefile-cjs-debug-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/index.ts b/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/index.ts index de4d3b09..ab39a6e5 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/index.ts +++ b/packages/variant-quickjs-singlefile-cjs-release-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-cjs-release-sync/src/index.ts b/packages/variant-quickjs-singlefile-cjs-release-sync/src/index.ts index 4d036202..87410c9f 100644 --- a/packages/variant-quickjs-singlefile-cjs-release-sync/src/index.ts +++ b/packages/variant-quickjs-singlefile-cjs-release-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/index.ts b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/index.ts index 5ee39ab0..b850a028 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/index.ts +++ b/packages/variant-quickjs-singlefile-mjs-debug-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-mjs-debug-sync/src/index.ts b/packages/variant-quickjs-singlefile-mjs-debug-sync/src/index.ts index eee455a7..93b7516d 100644 --- a/packages/variant-quickjs-singlefile-mjs-debug-sync/src/index.ts +++ b/packages/variant-quickjs-singlefile-mjs-debug-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/index.ts b/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/index.ts index 9007786c..b4b8d2b2 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/index.ts +++ b/packages/variant-quickjs-singlefile-mjs-release-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-singlefile-mjs-release-sync/src/index.ts b/packages/variant-quickjs-singlefile-mjs-release-sync/src/index.ts index 11cad126..6dbea98b 100644 --- a/packages/variant-quickjs-singlefile-mjs-release-sync/src/index.ts +++ b/packages/variant-quickjs-singlefile-mjs-release-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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 | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. | diff --git a/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts b/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts index faec7fc0..a0dfed7d 100644 --- a/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts +++ b/packages/variant-quickjs-wasmfile-debug-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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. | diff --git a/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts b/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts index 3a36108c..68cfda99 100644 --- a/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts +++ b/packages/variant-quickjs-wasmfile-debug-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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. | diff --git a/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts b/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts index c9788755..8310f7bb 100644 --- a/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts +++ b/packages/variant-quickjs-wasmfile-release-asyncify/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSAsyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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. | diff --git a/packages/variant-quickjs-wasmfile-release-sync/src/index.ts b/packages/variant-quickjs-wasmfile-release-sync/src/index.ts index 42406678..4b1e997b 100644 --- a/packages/variant-quickjs-wasmfile-release-sync/src/index.ts +++ b/packages/variant-quickjs-wasmfile-release-sync/src/index.ts @@ -8,6 +8,7 @@ import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types" * * | Variable | Setting | Description | * | -- | -- | -- | + * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. | * | 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. | diff --git a/scripts/prepareVariants.ts b/scripts/prepareVariants.ts index cdfc63e3..fcdb5469 100755 --- a/scripts/prepareVariants.ts +++ b/scripts/prepareVariants.ts @@ -478,7 +478,7 @@ and [QuickJSAsyncContext](${DOC_ROOT_URL}/quickjs-emscripten/classes/QuickJSAsyn const describeLibrary = { [CLibrary.QuickJS]: `The original [bellard/quickjs](https://github.com/bellard/quickjs) library.`, - [CLibrary.NG]: `[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features.`, + [CLibrary.NG]: `[quickjs-ng/quickjs](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs under active community development. It implements more EcmaScript features, and drop some non-standard QuickJS only features like BigFloat. May become the default library in a future version of quickjs-emscripten.`, } const describeModuleFactory = { @@ -524,6 +524,7 @@ ${variant.description} | Variable | Setting | Description | | -- | -- | -- | +| library | ${variant.library} | ${describeLibrary[variant.library]} | | releaseMode | ${variant.releaseMode} | ${describeMode[variant.releaseMode]} | | syncMode | ${variant.syncMode} | ${describeSyncMode[variant.syncMode]} | | emscriptenInclusion | ${variant.emscriptenInclusion} | ${inclusion} |