Skip to content

Instantly share code, notes, and snippets.

@L04DB4L4NC3R
Last active January 15, 2020 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save L04DB4L4NC3R/76f90e5246e25ed5e6bf619d13d9f98a to your computer and use it in GitHub Desktop.
Save L04DB4L4NC3R/76f90e5246e25ed5e6bf619d13d9f98a to your computer and use it in GitHub Desktop.
wasm doubt
<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>
@L04DB4L4NC3R
Copy link
Author

In Firefox
image

In Chrome
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment