Skip to content

Commit f59d468

Browse files
committed
Re-enable wasm32-unknown-emscripten target.
Uses a trick described in rust-lang/rust/issues#85821#issuecomment-969369677. Note that this still allows it to run, despite there seemingly being no entry point: this has no effect on the resulting code. Related to #609. Partially fixes #839.
1 parent 90e44e6 commit f59d468

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ jobs:
182182
- { target: x86_64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, runners: qemu-user }
183183
- { target: x86_64-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
184184
- { target: i686-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
185-
# Disabled for now, see https://github.com/rust-lang/rust/issues/85821
185+
# Disabled for now, see https://github.com/rust-lang/rust/issues/98216
186186
#- { target: asmjs-unknown-emscripten, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
187-
#- { target: wasm32-unknown-emscripten, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
187+
- { target: wasm32-unknown-emscripten, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
188188
- { target: x86_64-unknown-dragonfly, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, build-std: 1 }
189189
- { target: i686-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 }
190190
- { target: x86_64-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 }

docker/Dockerfile.wasm32-unknown-emscripten

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
1616
python
1717

1818
ENV CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node \
19-
BINDGEN_EXTRA_CLANG_ARGS_wasm32_unknown_emscripten="--sysroot=/emsdk/upstream/emscripten/cache/sysroot"
19+
BINDGEN_EXTRA_CLANG_ARGS_wasm32_unknown_emscripten="--sysroot=/emsdk/upstream/emscripten/cache/sysroot" \
20+
EMCC_CFLAGS="-s ERROR_ON_UNDEFINED_SYMBOLS=0 --no-entry ${EMCC_CFLAGS}"

0 commit comments

Comments
 (0)