Skip to content

Commit 07b619f

Browse files
Update installation
1 parent 18a07ac commit 07b619f

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,26 @@ jobs:
6161
working-directory: multilingual-src
6262
run: pip install -e ".[dev,wasm]"
6363

64+
# wabt must be installed before the bundle build so wat2wasm is
65+
# available to assemble the WAT text → WASM binary.
66+
- name: Install wabt (wat2wasm, wasm-validate, wasm2wat)
67+
run: sudo apt-get install -y wabt
68+
6469
- name: Build browser WASM bundle from demo.ml
6570
run: |
66-
# WATCodeGenerator compiles demo.ml → WAT text → WASM binary.
67-
# Artifacts land in wasm-out/:
68-
# module.wat, module.wasm, host_shim.js, abi_manifest.json
71+
# WATCodeGenerator compiles demo.ml → WAT text (module.wat).
72+
# wat2wasm then assembles the binary (module.wasm).
73+
# Additional artifacts: host_shim.js, abi_manifest.json
6974
mkdir -p wasm-out
7075
multilingual build-wasm-bundle demo.ml --out-dir wasm-out
7176
72-
# wabt provides wasm2wat for validating / inspecting the binary.
73-
# The primary .wat is already emitted by build-wasm-bundle above,
74-
# but wasm2wat gives a round-trip check and canonical text form.
75-
- name: Install wabt (wasm-validate, wasm2wat)
76-
run: sudo apt-get install -y wabt
77-
78-
- name: Validate and normalise WAT
77+
- name: Assemble and validate WASM binary
7978
run: |
79+
# Assemble the canonical WAT text into a binary.
80+
# This works whether build-wasm-bundle emits .wasm or not;
81+
# we always produce the binary from the WAT source of truth.
82+
wat2wasm wasm-out/module.wat -o wasm-out/module.wasm
8083
wasm-validate wasm-out/module.wasm
81-
# Overwrite with canonical round-trip WAT (catches any encoding drift).
82-
wasm2wat wasm-out/module.wasm -o wasm-out/module.wat
8384
8485
- name: Rename artifacts to stable names
8586
run: |

0 commit comments

Comments
 (0)