Last active
January 15, 2020 23:17
-
-
Save L04DB4L4NC3R/76f90e5246e25ed5e6bf619d13d9f98a to your computer and use it in GitHub Desktop.
wasm doubt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(async () => { | |
const bytes = await fetch("target/wasm32-unknown-unknown/debug/car_fib.wasm") | |
const response = await bytes.arrayBuffer() | |
const result = await WebAssembly.instantiate(response, {}) | |
console.log(result.instance.exports.add(10, 3)) | |
})() | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Firefox
In Chrome