wasm-bindgen

Generate Rust-JavaScript bindings for WebAssembly modules

brewmacoslinux
Try with needOr install directly
Source

About

Facilitating high-level interactions between Wasm modules and JavaScript

Commands

wasm-bindgen

Examples

Generate JavaScript bindings for a compiled WebAssembly module$ wasm-bindgen path/to/module.wasm --out-dir ./pkg
Generate bindings with TypeScript support$ wasm-bindgen path/to/module.wasm --out-dir ./pkg --typescript
Generate bindings for bundler environments like webpack$ wasm-bindgen path/to/module.wasm --out-dir ./pkg --target bundler