Socket
Socket
Sign inDemoInstall

@bytecodealliance/jco

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bytecodealliance/jco - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

5

package.json
{
"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",

62

README.md

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc