Files
Pietralberto Mazza 26bcbc8163 [SDK] Fix rest client and wasm (#341)
* Fixes

Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* Fixes to rest client

* Fixes to wasm

---------

Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>
2024-10-01 19:00:25 +02:00

28 lines
588 B
Markdown

## USAGE
This example demonstrates how to compile ARK Go SDK to WebAssembly and use it in a web page.
1. Copy `wasm_exec.js` to a new directory:
```bash
cp $(go env GOROOT)/misc/wasm/wasm_exec.js .
```
2. On the root directory of this repo, build the Go code to WebAssembly:
```bash
make build-wasm
```
3. Move the wasm file to your directory
```bash
mv <repo>/pkg/client-sdk/build/ark-sdk.wasm .
4. Load the WebAssembly module in a web page, check [index.html](index.html).
5. Serve the files:
```bash
python3 -m http.server 8000
```