-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathindex.ts
25 lines (23 loc) · 1.71 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import type { QuickJSSyncVariant } from "@jitl/quickjs-ffi-types"
/**
* ### @jitl/quickjs-ng-wasmfile-debug-sync
*
* [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 |
* | -- | -- | -- |
* | library | quickjs-ng | [quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly. Version [git+7ded62c5](https://github.com/quickjs-ng/quickjs/commit/7ded62c536fca860b8106c39fb75f2df8fe27180) vendored to quickjs-emscripten on 2024-02-12. |
* | releaseMode | debug | Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. |
* | syncMode | 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 |
*
*/
const variant: QuickJSSyncVariant = {
type: "sync",
importFFI: () => import("./ffi.js").then((mod) => mod.QuickJSFFI),
importModuleLoader: () =>
import("@jitl/quickjs-ng-wasmfile-debug-sync/emscripten-module").then((mod) => mod.default),
} as const
export default variant