Playground
This application runs a subset of Substation's data transformation features (conditions, processors) in the browser using WebAssembly.
Building the Playground
From the project root, run these commands:
GOOS=js GOARCH=wasm go build -ldflags="-s -w" -o build/playground/playground.wasm cmd/playground/wasm/main.go && \
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" build/playground && \
cp substation_logo.png build/playground && \
gzip -9 -v -c build/playground/playground.wasm > build/playground/playground.wasm.gz && \
rm build/playground/playground.wasm
The directory build/playground
now contains the compiled playground application and a webpage that serves it.
Starting the Playground
From the project root, run this command:
go run cmd/playground/server/main.go
The playground is accessible in any browser at http://localhost:8000
.
Updated over 1 year ago