mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 12:44:19 +01:00
* 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>
588 B
588 B
USAGE
This example demonstrates how to compile ARK Go SDK to WebAssembly and use it in a web page.
-
Copy
wasm_exec.jsto a new directory:cp $(go env GOROOT)/misc/wasm/wasm_exec.js . -
On the root directory of this repo, build the Go code to WebAssembly:
make build-wasm -
Move the wasm file to your directory
mv <repo>/pkg/client-sdk/build/ark-sdk.wasm . -
Load the WebAssembly module in a web page, check index.html.
-
Serve the files:
python3 -m http.server 8000