Skip to content

Commit 742e309

Browse files
committed
Use wasm-opt to reduce file size
1 parent 7ab67c7 commit 742e309

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/wasm.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ jobs:
121121
run: |
122122
mkdir ~/out
123123
wasm32-wasi-cabal build
124-
cp $(wasm32-wasi-cabal list-bin als) ~/out
124+
ALS_PATH=$(wasm32-wasi-cabal list-bin als)
125+
stat --format="%s" "$ALS_PATH"
126+
time wasm-opt "$ALS_PATH" -Oz -o ~/out/als.wasm
127+
stat --format="%s" ~/out/als.wasm
125128
126129
- name: Clean up native/wasm cabal logs
127130
run: rm -rf ~/.cache/cabal/logs ~/.ghc-wasm/.cabal/logs

0 commit comments

Comments
 (0)