Skip to content

Commit b125e1b

Browse files
committed
Add wasm32 compilation check to CI
Add a `wasm-check` job that verifies compilation for wasm32-unknown-emscripten. Since wasm32 is a 32-bit target, this catches pointer width regressions before merge. Related: #347
1 parent 9973069 commit b125e1b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/full-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,24 @@ jobs:
213213
- name: "Test"
214214
run: cargo test -p godot-cell --features="proptest"
215215

216+
# Verifies that the library compiles for wasm32, which is a 32-bit target.
217+
# This catches regressions in 32-bit support (e.g., pointer width assumptions).
218+
# See https://github.com/godot-rust/gdext/issues/347.
219+
wasm-check:
220+
name: wasm-check
221+
runs-on: ubuntu-22.04
222+
steps:
223+
- uses: actions/checkout@v4
224+
225+
- name: "Install Rust"
226+
uses: ./.github/composite/rust
227+
228+
- name: "Add wasm target"
229+
run: rustup target add wasm32-unknown-emscripten
230+
231+
- name: "Check wasm32 compilation (32-bit target)"
232+
run: cargo check --target wasm32-unknown-emscripten -p godot --features experimental-wasm,experimental-wasm-nothreads
233+
216234
# For complex matrix workflow, see https://stackoverflow.com/a/65434401
217235
godot-itest:
218236
name: godot-itest (${{ matrix.name }})
@@ -493,6 +511,7 @@ jobs:
493511
- unit-test
494512
- miri-test
495513
- proptest
514+
- wasm-check
496515
- godot-itest
497516
- cargo-deny-machete
498517
- license-guard

0 commit comments

Comments
 (0)