wasm proof generation from browser working. Added cli wasm exporters, html&js browser example, wasm wrapper from go

This commit is contained in:
arnaucube
2019-06-24 16:50:28 +02:00
parent 662d92b697
commit 0a162482ee
14 changed files with 260 additions and 6 deletions

19
wasm/index.html Normal file
View File

@@ -0,0 +1,19 @@
<html>
<head>
<meta charset="utf-8">
<title>go-snark wasm experiments</title>
</head>
<body>
<script src="wasm_exec.js"></script>
<script>
const go = new Go();
WebAssembly.instantiateStreaming(fetch('go-snark.wasm'), go.importObject).then(function(dat) {
go.run(dat.instance);
});
</script>
<button onClick="callGenerateProof();">Generate Proof</button>
<textarea id="proofResult" rows="15" style="width: 80%;">
</textarea>
<script src="index.js"></script>
</body>
</html>