Public
Script
1
2
3
4
5
6
7
8
9
10
11
12
13
import { umdImport } from "https://esm.town/v/easrng/umdImport";
const loadWABT = await umdImport(
"https://unpkg.com/wabt@1.0.32/index.js",
) as typeof import("https://unpkg.com/wabt@1.0.32/index.d.ts");
const wabt = await loadWABT();
const wasm = new Uint8Array(
`0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,0,7,16,2,3,102,105,98,0,0,6,109,101,109,111,114,121,2,0,10,53,1,51,1,3,127,65,1,33,1,32,0,65,0,74,4,64,3,64,32,0,65,1,107,34,0,4,64,32,1,32,2,106,33,3,32,1,33,2,32,3,33,1,12,1,11,11,32,1,15,11,65
.split(",").map(e => parseInt(e)),
);
const myModule = wabt.readWasm(wasm, { readDebugNames: true });
myModule.applyNames();
const wast = myModule.toText({ foldExprs: false, inlineExport: false });
console.log(wast);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
January 2, 2024