@bytecodealliance/jco
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "@bytecodealliance/jco", | ||
"description": "JavaScript tooling for working with WebAssembly Components", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"exports": "./api.mjs", | ||
@@ -11,2 +11,5 @@ "types": "api.d.ts", | ||
}, | ||
"dependencies": { | ||
"@bytecodealliance/componentize-js": "^0.0.1" | ||
}, | ||
"repository": { | ||
@@ -13,0 +16,0 @@ "type": "git", |
@@ -21,7 +21,8 @@ <div align="center"> | ||
* Creating WebAssembly Components from JavaScript sources and a WIT world | ||
* "Transpiling" Wasm Component binaries into ES modules that can run in any JS environment. | ||
* Optimization helpers for Components via Binaryen | ||
* Optimization helpers for Components via Binaryen. | ||
* Component builds of [Wasm Tools](https://github.com/bytecodealliance/wasm-tools) helpers, available for use as a library or CLI commands for use in native JS environments. | ||
For creating components, see the [Cargo Component](https://github.com/bytecodealliance/cargo-Component) project for Rust and [Wit Bindgen](https://github.com/bytecodealliance/wit-bindgen) for various guest bindgen helpers. | ||
For creating components in other languages, see the [Cargo Component](https://github.com/bytecodealliance/cargo-Component) project for Rust and [Wit Bindgen](https://github.com/bytecodealliance/wit-bindgen) for various guest bindgen helpers. | ||
@@ -42,2 +43,28 @@ > **Note**: This is an experimental project, no guarantees are provided for stability or support and breaking changes may be made in future. | ||
## CLI | ||
```shell | ||
Usage: jco <command> [options] | ||
jco - WebAssembly JS Component Tools | ||
JS Component Transpilation Bindgen & Wasm Tools for JS | ||
Options: | ||
-V, --version output the version number | ||
-h, --help display help for command | ||
Commands: | ||
componentize [options] <js-source> Create a component from a JavaScript module | ||
transpile [options] <component-path> Transpile a WebAssembly Component to JS + core Wasm for JavaScript execution | ||
opt [options] <component-file> optimizes a Wasm component, including running wasm-opt Binaryen optimizations | ||
wit [options] <component-path> extract the WIT from a WebAssembly Component [wasm-tools component wit] | ||
print [options] <input> print the WebAssembly WAT text for a binary file [wasm-tools print] | ||
metadata-show [options] [module] extract the producer metadata for a Wasm binary [wasm-tools metadata show] | ||
metadata-add [options] [module] add producer metadata for a Wasm binary [wasm-tools metadata add] | ||
parse [options] <input> parses the Wasm text format into a binary file [wasm-tools parse] | ||
new [options] <core-module> create a WebAssembly component adapted from a component core Wasm [wasm-tools component new] | ||
embed [options] [core-module] embed the component typing section into a core Wasm module [wasm-tools component embed] | ||
help [command] display help for command | ||
``` | ||
## API | ||
@@ -47,2 +74,8 @@ | ||
#### `componentize(jsSource: String, witWorld: String, opts?): Promise<{ component: Uint8Array }>` | ||
Creates a component from a JS file and WIT world definition, via a Spidermonkey engine embedding. | ||
See [ComponentizeJS](https://github.com/bytecodealliance/componentize-js) for more details on this process. | ||
#### `transpile(component: Uint8Array, opts?): Promise<{ files: Record<string, Uint8Array> }>` | ||
@@ -98,27 +131,2 @@ | ||
## CLI | ||
```shell | ||
Usage: jco <command> [options] | ||
jco - WebAssembly JS Component Tools | ||
JS Component Transpilation Bindgen & Wasm Tools for JS | ||
Options: | ||
-V, --version output the version number | ||
-h, --help display help for command | ||
Commands: | ||
transpile [options] <component-path> Transpile a WebAssembly Component to JS + core Wasm for JavaScript execution | ||
opt [options] <component-file> optimizes a Wasm component, including running wasm-opt Binaryen optimizations | ||
wit [options] <component-path> extract the WIT from a WebAssembly Component [wasm-tools component wit] | ||
print [options] <input> print the WebAssembly WAT text for a binary file [wasm-tools print] | ||
metadata-show [options] [module] extract the producer metadata for a Wasm binary [wasm-tools metadata show] | ||
metadata-add [options] [module] add producer metadata for a Wasm binary [wasm-tools metadata add] | ||
parse [options] <input> parses the Wasm text format into a binary file [wasm-tools parse] | ||
new [options] <core-module> create a WebAssembly component adapted from a component core Wasm [wasm-tools component new] | ||
embed [options] [core-module] embed the component typing section into a core Wasm module [wasm-tools component embed] | ||
help [command] display help for command | ||
``` | ||
## Contributing | ||
@@ -125,0 +133,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28724359
78996
145
1
+ Added@bytecodealliance/componentize-js@0.0.1(transitive)
+ Added@jakechampion/wizer@1.6.0(transitive)
+ Added@jakechampion/wizer-darwin-arm64@1.6.0(transitive)
+ Added@jakechampion/wizer-darwin-x64@1.6.0(transitive)
+ Added@jakechampion/wizer-linux-x64@1.6.0(transitive)
+ Added@jakechampion/wizer-win32-x64@1.6.0(transitive)