Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 28, 2019 02:13
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 parzibyte/a036b2c07c2fdb4bb85d075a3ba1f707 to your computer and use it in GitHub Desktop.
Save parzibyte/a036b2c07c2fdb4bb85d075a3ba1f707 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="es">
<!--
Un acercamiento a WebAssembly con Go
@author parzibyte
Visita: parzibyte.me/blog
-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WebAssemby en Go | By Parzibyte</title>
</head>
<body>
<h1>WebAssembly en Go</h1>
<a href="//parzibyte.me/blog">By Parzibyte</a>
<!-- Cargar los scripts de WASM--->
<script src="./wasm_exec.js"></script>
<script>
const go = new Go();
console.log("Cargando el archivo main.wasm");
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject)
.then((result) => {
console.log("Carga completa");
go.run(result.instance);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment