playground/

directory
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2023 License: MIT

README

playground

Contains Substation apps deployed in the browser using WebAssembly (WASM). These provide similar functionality to the Go Playground, but are run locally in the browser.

wasm

This app runs Substation in the browser. Some features of Substation are not supported due to limitations in WASM. The WASM binary is built using 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

server

This app starts a local server that serves the WASM binary. The server is started using this command:

go run cmd/playground/server/main.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL