wasm-js-cycle.js (414B)
1 import * as mod from "./wasm-js-cycle.wasm"; 2 3 let jsGlob = new WebAssembly.Global({ value: "i32", mutable: true }, 42); 4 let jsMem = new WebAssembly.Memory({ initial: 10 }); 5 let jsTab = new WebAssembly.Table({ initial: 10, element: "anyfunc" }); 6 let jsFunc = () => { return 42; }; 7 8 export { jsGlob, jsMem, jsTab, jsFunc }; 9 10 export function mutateBindings() { 11 jsGlob = 0; 12 jsMem = 0; 13 jsTab = 0; 14 jsFunc = 0; 15 }