Skip to content

Commit

Permalink
smaller wasm binary
Browse files Browse the repository at this point in the history
-s
	Omit the symbol table and debug information.

-d
	Disable generation of dynamic executables.
	The emitted code is the same in either case; the option
	controls only whether a dynamic header is included.
	The dynamic header is on by default, even without any
	references to dynamic libraries, because many common
	system tools now assume the presence of the header.
  • Loading branch information
sd65 committed May 15, 2021
1 parent 4afcddc commit 45efd05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildFrontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
echo "[1] Build wasm"
wasmPayloadFile=$(mktemp)
trap 'rm -f $wasmPayloadFile' ERR EXIT
GOOS=js GOARCH=wasm go build -o "$wasmPayloadFile" wasm/wasm.go
GOOS=js GOARCH=wasm go build -ldflags="-s -w" -o "$wasmPayloadFile" wasm/wasm.go

echo "[2] Pack wasm into javascript"
wasmJsPayloadFile="frontend/js/wasmPayload.js"
Expand Down

0 comments on commit 45efd05

Please sign in to comment.