Usage
import("@axetroy/wasm-printer").then((parse_wat) => {
fetch("/path/to/demo.wasm")
.then((resp) => resp.arrayBuffer())
.then((bytes) => {
const str = parse_wat(new Uint8Array(bytes));
console.log(str);
});
});
🚴 Installation
- if you are using Bundler(Which build-in support to importing wasm module, eg. Webpack^5/Vite)
npm install @axetroy/wasm-printer
- If you are using in Native browser
🛠️ Build from source
Make sure you have install rust^1.69 and wasm-pack
make