# js-component-tools **Repository Path**: mirrors_guybedford/js-component-tools ## Basic Information - **Project Name**: js-component-tools - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-18 - **Last Updated**: 2026-04-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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/package/binaryen). _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 [options] WebAssembly Component Tools Options: -V, --version output the version number -h, --help display help for command Commands: wit [options] [wasm2wit] decode the world WIT for a WebAssembly Component host [options] [wit-bindgen host js] host a WebAssembly component for JavaScript execution opt [options] optimizes a Wasm component, including running wasm-opt Binaryen optimizations print [options] [wasm-tools print] prints the WebAssembly binary textual form parse [options] [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 }); ```