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