@andreiltd/componentize-qjs-binding-darwin-x64 0.2.1 → 0.3.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/README.md +9 -3
- package/componentize-qjs.darwin-x64.node +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,8 +104,9 @@ wasmtime run --wasm component-model-async=y --invoke 'greet("World")' hello.wasm
|
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
The built-in runtime published with componentize-qjs includes component-model
|
|
107
|
-
async support.
|
|
108
|
-
|
|
107
|
+
async support. Pass `--sync` to embed the built-in non-async runtime instead,
|
|
108
|
+
producing components that run on hosts without component-model async support. A
|
|
109
|
+
custom runtime can also be supplied with `--runtime`.
|
|
109
110
|
|
|
110
111
|
## CLI Reference
|
|
111
112
|
|
|
@@ -122,12 +123,14 @@ componentize-qjs [OPTIONS] --wit <WIT> --js <JS>
|
|
|
122
123
|
| `--stub-wasi` | | Replace all WASI imports with trap stubs |
|
|
123
124
|
| `--minify` | `-m` | Minify JS source before embedding |
|
|
124
125
|
| `--opt-size` | | Use the built-in QuickJS runtime optimized for size |
|
|
126
|
+
| `--sync` | | Use the built-in non-async runtime (combine with `--opt-size` for the non-async opt-size runtime) |
|
|
125
127
|
| `--runtime <PATH>` | | Custom QuickJS runtime Wasm module to embed |
|
|
126
128
|
|
|
127
129
|
### Cargo features
|
|
128
130
|
|
|
129
131
|
| Feature | Effect |
|
|
130
132
|
|---|---|
|
|
133
|
+
| `component-model-async` | (default) Embed the component-model async runtime as the default built-in. The non-async runtime is always embedded and selectable via `--sync`. Disable to build a smaller binary with only the non-async runtime |
|
|
131
134
|
| `opt-size` | Selects the bundled opt-size runtime when no runtime option is provided by the CLI or npm API |
|
|
132
135
|
|
|
133
136
|
Build with features:
|
|
@@ -383,7 +386,10 @@ const { component } = await componentize({
|
|
|
383
386
|
// component is a Buffer containing the WebAssembly component bytes
|
|
384
387
|
```
|
|
385
388
|
|
|
386
|
-
Runtime selection is available through `optSize`, `
|
|
389
|
+
Runtime selection is available through `optSize`, `sync`, `runtime`, or
|
|
390
|
+
`runtimeBytes`. `optSize` and `sync` may be combined to select the non-async
|
|
391
|
+
opt-size runtime, but neither can be combined with a custom `runtime`/`runtimeBytes`.
|
|
392
|
+
The `runtime` option is a path to a custom QuickJS runtime Wasm module.
|
|
387
393
|
|
|
388
394
|
## Acknowledgments
|
|
389
395
|
|
|
Binary file
|