From 86128afc09d24831b265937922d88b7eb5f01e62 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sat, 16 Dec 2017 19:58:45 -0500 Subject: [PATCH] Update wasm targets for emcc 1.37.22 Currently, the main loop seems to get stuck, needs some debugging. --- debug_wasm.sh | 8 +++++--- release_wasm.sh | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/debug_wasm.sh b/debug_wasm.sh index cb4f144..b9bbad9 100755 --- a/debug_wasm.sh +++ b/debug_wasm.sh @@ -1,5 +1,7 @@ set -e -cargo rustc --target asmjs-unknown-emscripten -- -C link-args='-s USE_SDL=2 --preload-file flora.xm' -cp -a target/asmjs-unknown-emscripten/debug/mandelwow.js . -cp -a target/asmjs-unknown-emscripten/debug/deps/mandelwow-*.data . +export CFLAGS="-g" +export CXXFLAGS="$CFLAGS" +cargo rustc --target wasm32-unknown-emscripten --bin mandelwow -- -C link-args='-s USE_SDL=2 --preload-file flora.xm' +cp -a target/wasm32-unknown-emscripten/release/mandelwow.{js,wasm} . +cp -a target/wasm32-unknown-emscripten/release/deps/mandelwow.data . emrun . diff --git a/release_wasm.sh b/release_wasm.sh index f3016b0..5738e2a 100755 --- a/release_wasm.sh +++ b/release_wasm.sh @@ -1,7 +1,8 @@ set -e export CFLAGS="-O2" export CXXFLAGS="$CFLAGS" +#cargo rustc --target wasm32-unknown-emscripten --release --bin mandelwow -- -C link-args='-s USE_WEBGL2=1 -s USE_SDL=2 --preload-file flora.xm' cargo rustc --target wasm32-unknown-emscripten --release --bin mandelwow -- -C link-args='-s USE_SDL=2 --preload-file flora.xm' -cp -a target/wasm32-unknown-emscripten/release/mandelwow.js . -cp -a target/wasm32-unknown-emscripten/release/deps/mandelwow-*.{wasm,data} . +cp -a target/wasm32-unknown-emscripten/release/mandelwow.{js,wasm} . +cp -a target/wasm32-unknown-emscripten/release/deps/mandelwow.data . emrun . -- 2.25.1