New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-component-tools

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-component-tools

JS-compiled CLI & API versions of some of [wasm-tools](https://github.com/bytecodealliance/wasm-tools), [wit-bindgen host js](https://github.com/bytecodealliance/wit-bindgen/tree/main/crates/gen-host-js) and [binaryen opt & wasm2asm](https://npmjs.org/pac

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

JS Component Tools

JS-compiled CLI & API versions of some of wasm-tools, wit-bindgen host js and binaryen opt & wasm2asm.

Note: This is an experimental prototype without any maintenance guarantees.

Install

CLI

npm install -g js-component-tools

The CLI is then available via the jsct --help command.

Usage: jsct <command> [options]

WebAssembly Component Tools

Options:
  -V, --version                    output the version number
  -h, --help                       display help for command

Commands:
  wit [options] <component-path>   [wasm2wit] decode the world WIT for a WebAssembly Component
  host [options] <component-path>  [wit-bindgen host js] host a WebAssembly component for JavaScript execution
  opt [options] <component-file>   optimizes a Wasm component, including running wasm-opt Binaryen optimizations
  print [options] <input>          [wasm-tools print] prints the WebAssembly binary textual form
  parse [options] <input>          [wasm-tools parse] parses the Wasm text format
  help [command]                   display help for command

API

npm install js-component-tools
import { host } from 'js-component-tools';
import { readFile } from 'fs/promises';

const component = await readFile('./component.wasm');
const compiledFiles = await host(component, { optimize: true, minify: true });

FAQs

Package last updated on 17 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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