Created
December 12, 2018 01:52
-
-
Save goofmint/498912908258f45a3f0621b7c32caeae 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
const go = new Go(); | |
(async () => { | |
const response = await fetch('main.wasm'); | |
const bytes = await response.arrayBuffer(); | |
const result = await WebAssembly.instantiate(bytes, go.importObject); | |
go.run(result.instance); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment