@componentor/quickjs-asmjs-mjs-release-sync 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,47 @@
1
+ quickjs-emscripten:
2
+ The MIT License
3
+
4
+ quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+
24
+
25
+ quickjs:
26
+ QuickJS Javascript Engine
27
+
28
+ Copyright (c) 2017-2021 Fabrice Bellard
29
+ Copyright (c) 2017-2021 Charlie Gordon
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy
32
+ of this software and associated documentation files (the "Software"), to deal
33
+ in the Software without restriction, including without limitation the rights
34
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
+ copies of the Software, and to permit persons to whom the Software is
36
+ furnished to do so, subject to the following conditions:
37
+
38
+ The above copyright notice and this permission notice shall be included in
39
+ all copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
44
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
47
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # @componentor/quickjs-asmjs-mjs-release-sync
2
+
3
+ Compiled to pure Javascript, no WebAssembly required.
4
+
5
+ This generated package is part of [quickjs-emscripten](https://github.com/componentor/quickjs-emscripten).
6
+ It contains a variant of the quickjs WASM library, and can be used with @componentor/quickjs-emscripten-core.
7
+
8
+ ```typescript
9
+ import variant from "@componentor/quickjs-asmjs-mjs-release-sync"
10
+ import { newQuickJSWASMModuleFromVariant } from "@componentor/quickjs-emscripten-core"
11
+ const QuickJS = await newQuickJSWASMModuleFromVariant(variant)
12
+ ```
13
+
14
+ This variant was built with the following settings:
15
+
16
+ ## Library: quickjs
17
+
18
+ The original [bellard/quickjs](https://github.com/bellard/quickjs) library.
19
+
20
+ Version [2024-02-14+36911f0d](https://github.com/bellard/quickjs/commit/36911f0d3ab1a4c190a4d5cbe7c2db225a455389) vendored to quickjs-emscripten on 2024-06-15.
21
+
22
+ ## Release mode: release
23
+
24
+ Optimized for performance; use when building/deploying your application.
25
+
26
+ ## Exports: import
27
+
28
+ Exports the following in package.json for the package entrypoint:
29
+
30
+ - Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module.
31
+
32
+ ## Extra async magic? No
33
+
34
+ The default, normal build. Note that both variants support regular async functions.
35
+
36
+ ## Single-file, or separate .wasm file? asmjs
37
+
38
+ The C library code is compiled to Javascript, no WebAssembly used. Sometimes called "asmjs". This is the slowest possible option, and is intended for constrained environments that do not support WebAssembly, like quickjs-for-quickjs.
39
+
40
+ ## More details
41
+
42
+ Full variant JSON description:
43
+
44
+ ```json
45
+ {
46
+ "library": "quickjs",
47
+ "releaseMode": "release",
48
+ "syncMode": "sync",
49
+ "description": "Compiled to pure Javascript, no WebAssembly required.",
50
+ "emscriptenInclusion": "asmjs",
51
+ "exports": {
52
+ "import": {
53
+ "emscriptenEnvironment": ["web", "worker", "node"]
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ Variant-specific Emscripten build flags:
60
+
61
+ ```json
62
+ [
63
+ "-Oz",
64
+ "-flto",
65
+ "--closure 1",
66
+ "-s FILESYSTEM=0",
67
+ "--pre-js $(TEMPLATES)/pre-extension.js",
68
+ "--pre-js $(TEMPLATES)/pre-wasmMemory.js",
69
+ "-s WASM=0",
70
+ "-s SINGLE_FILE=1"
71
+ ]
72
+ ```
@@ -0,0 +1,14 @@
1
+ // Generated from ../../templates/emscripten-module.SYNC.d.ts
2
+ import type {
3
+ EmscriptenModuleLoader,
4
+ QuickJSEmscriptenModule,
5
+ } from "@componentor/quickjs-ffi-types"
6
+ /**
7
+ * Emscripten module built from the unmodified [`quickjs/quickjs.h`](../quickjs/quickjs.h)
8
+ * and our FFI support functions [c/interface.c](../c/interface.c).
9
+ *
10
+ * Note that emscripten modules returned by a `MODULARIZE=1` emscripten build
11
+ * (like this one) load asynchronously.
12
+ */
13
+ declare const ModuleLoader: EmscriptenModuleLoader<QuickJSEmscriptenModule>
14
+ export default ModuleLoader