blob: eb97b2116faf5cf452a649eb5e7e402bba767de4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
let bytes = wasmTextToBinary(`
(module
(func $main (export "main") (result i32 i32)
(i32.const 1)
(i32.const 2)
(i32.const 0)
(br_table 0 0)))`);
let instance = new WebAssembly.Instance(new WebAssembly.Module(bytes));
instance.exports.main();
|