go-snark/wasm/README.md
wasm/README.mdRaw
1# go-snark wasm
2*Warning: this is an ongoing experimentation*
3
4WASM wrappers for zkSNARK Pinocchio & Groth16 protocols.
5
6## Wasm usage
7To compile to wasm, inside the `wasm` directory, execute:
8```
9GOARCH=wasm GOOS=js go build -o go-snark.wasm go-snark-wasm-wrapper.go
10```
11
12Add the file `wasm_exec.js` in the directory:
13```
14cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .
15```
16
17To see the usage from javascript, check `index.js` file.
18
19Run the http server that allows to load the `.wasm` file:
20```
21node server.js
22```