Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (async function() {
- const wasm = new Uint8Array([
- 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x07, 0x01, 0x60, 0x02, 0x7f, 0x7f, 0x01,
- 0x7f, 0x03, 0x02, 0x01, 0x00, 0x07, 0x0a, 0x01, 0x06, 0x61, 0x64, 0x64, 0x54, 0x77, 0x6f, 0x00,
- 0x00, 0x0a, 0x09, 0x01, 0x07, 0x00, 0x20, 0x00, 0x20, 0x01, 0x6a, 0x0b, 0x00, 0x0e, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x02, 0x07, 0x01, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00]);
- const lib = await WebAssembly.instantiate(wasm).
- then(res => res.instance.exports);
- console.log(lib.addTwo(2, 2));
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement