Skip to content

Commit

Permalink
Re-enable wasm32-unknown-emscripten target.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Alexhuszagh committed Jun 23, 2022
1 parent 90e44e6 commit f59d468
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ jobs:
- { target: x86_64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1, runners: qemu-user }
- { target: x86_64-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
- { target: i686-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
# Disabled for now, see https://github.com/rust-lang/rust/issues/85821
# Disabled for now, see https://github.com/rust-lang/rust/issues/98216
#- { target: asmjs-unknown-emscripten, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
#- { target: wasm32-unknown-emscripten, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
- { target: wasm32-unknown-emscripten, os: ubuntu-latest, cpp: 1, std: 1, run: 1 }
- { target: x86_64-unknown-dragonfly, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, build-std: 1 }
- { target: i686-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 }
- { target: x86_64-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 }
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile.wasm32-unknown-emscripten
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
python

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

0 comments on commit f59d468

Please sign in to comment.