Created
December 8, 2017 11:21
-
-
Save goofmint/58b90e6ab3247fe2165a97d089d46ee0 to your computer and use it in GitHub Desktop.
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
var sum = null; | |
fetch('main.wasm') | |
.then((response) => response.arrayBuffer()) | |
.then((bytes) => WebAssembly.instantiate(bytes, {})) | |
.then((results) => { | |
const instance = results.instance; | |
sum = instance.exports.sum; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment