mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
586023b45d
Adds another example showing the simple case of executing main, adds a README explaining how everything fits together and how to execute the compiled code in the browser. Include a minimal webserver for local testing.
21 lines
477 B
HTML
21 lines
477 B
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Go WebAssembly</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<script src="wasm_exec.js" defer></script>
|
|
<script src="wasm.js" defer></script>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>WebAssembly</h1>
|
|
<p>Add two numbers, using WebAssembly:</p>
|
|
<input type="number" id="a" value="2" /> + <input type="number" id="b" value="2" /> = <input type="number"
|
|
id="result" readonly />
|
|
</body>
|
|
|
|
</html>
|