pro-self-extracting-wasm
is a CLI utility for compiling self-extracting
WebAssembly executables for use in the browser.
Install the CLI compiler and runtime library
npm install pro-self-extracting-wasm
Compile your target
npm exec pro_self_extracting_wasm ./my_assembly.wasm --output my_assembly.compressed.wasm
Unzip the bundle in JavaScript
import {extract} from "pro-self-extracting-wasm";
const my_assembly = await extract(fetch("./my_assembly.compressed.wasm"));