-
Richard T. Carback III authoredRichard T. Carback III authored
xxdk-WASM
This repository contains the WebAssembly bindings for xxDK. It also includes examples and a test server to serve the compiled WebAssembly module.
Note: If you are updating the version of Go that this repository uses, you
need to ensure that you update the wasm_exec.js
file as described
below.
Updates
The current semantic version of this repository is stored in SEMVER
in
version.go
. When making major updates or updates that create an
incompatibility in the storage or databases, the semantic version needs to be
updated and an upgrade path needs to be provided.
Building
The repository can only be compiled to a WebAssembly binary using GOOS=js
and
GOARCH=wasm
.
$ GOOS=js GOARCH=wasm go build -o xxdk.wasm
Running Unit Tests
Because the bindings use syscall/js
, tests cannot only be run in a browser. To
automate this process first get
wasmbrowsertest and follow their
installation instructions.
Then, tests can be run using the following command.