Skip to content

Commit ab7b5e3

Browse files
committed
fix: WASM smoke test — verify compilation only, skip wasmtime
GHC's WASM backend produces binaries with ghc_wasm_jsffi imports (from ghc-internal's Wasm.Prim.Types), requiring a JavaScript host environment (Node.js + GHC WASM runtime shim). Plain wasmtime can't satisfy these imports. Compilation + linking is sufficient to validate the cross-build.
1 parent 74a5f01 commit ab7b5e3

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/nix-ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -829,14 +829,13 @@ jobs:
829829
export PATH=$PATH:$HOME/.ghc-wasm/wasi-sdk/bin
830830
echo 'main = putStrLn "Hello from WASM backend"' > /tmp/hello.hs
831831
_build/dist/bin/wasm32-unknown-wasi-ghc /tmp/hello.hs -o /tmp/hello.wasm
832-
# Run with wasmtime if available (ghc-wasm-meta may install it
833-
# under different paths depending on FLAVOUR)
834-
WASMTIME=$(find $HOME/.ghc-wasm -name wasmtime -type f 2>/dev/null | head -1)
835-
if [[ -n "$WASMTIME" ]]; then
836-
"$WASMTIME" /tmp/hello.wasm
837-
else
838-
echo "wasmtime not found, skipping runtime test (compilation succeeded)"
839-
fi
832+
# Verify the .wasm binary was produced. Runtime execution requires
833+
# JavaScript FFI glue (ghc_wasm_jsffi imports from ghc-internal),
834+
# so plain wasmtime can't run it — would need Node.js + GHC WASM
835+
# runtime shim. Compilation + linking is sufficient to validate
836+
# the cross-build.
837+
ls -lh /tmp/hello.wasm
838+
file /tmp/hello.wasm
840839
841840
- name: Upload WASM cross artifacts
842841
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)