@componentor/quickjs-singlefile-browser-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,71 @@
1
+ # @componentor/quickjs-singlefile-browser-release-sync
2
+
3
+ Variant with the WASM data embedded into a browser ESModule.
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-singlefile-browser-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: browser
27
+
28
+ Exports the following in package.json for the package entrypoint:
29
+
30
+ - Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments.
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? singlefile
37
+
38
+ 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.
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": "Variant with the WASM data embedded into a browser ESModule.",
50
+ "emscriptenInclusion": "singlefile",
51
+ "exports": {
52
+ "browser": {
53
+ "emscriptenEnvironment": ["web", "worker"]
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 SINGLE_FILE=1"
70
+ ]
71
+ ```