function compileWasm(code) {
const module = wabt.parseWat('unnamed.wat', code);
module.resolveNames();
module.validate();
const binary = module.toBinary({log: true, write_debug_names:true});
const {WebAssembly} = window;
const wasm = new WebAssembly.Module(binary.buffer);
const instance = new WebAssembly.Instance(wasm, {});
return instance.exports;
}