Open orthecreedence opened 4 years ago
Hi,I also encountered the same problem
Build env:
emscripten (1.39.13)
stdweb = "0.4"
stdweb-derive = "0.5.1"`
Target:
cargo build --release --target asmjs-unknown-emscripten
Run exceptions:
exception thrown: Error: abort(unexpected char in asm const signature 101) at Error
at jsStackTrace (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:165930:12)
at stackTrace (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:165945:11)
at abort (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:164809:43)
at readAsmConstArgs (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:169000:10)
at _emscripten_asm_const_ii (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:165907:13)
at Array.W3 (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:125946:7)
at Array.dT (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:160270:19)
at o3 (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:104256:25)
at Module._main (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:169925:31)
at callMain (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:170706:13),Error: abort(unexpected char in asm const signature 101) at Error
at jsStackTrace (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:165930:12)
at stackTrace (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:165945:11)
at abort (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:164809:43)
at readAsmConstArgs (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:169000:10)
at _emscripten_asm_const_ii (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:165907:13)
at Array.W3 (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:125946:7)
at Array.dT (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:160270:19)
at o3 (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:104256:25)
at Module._main (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:169925:31)
at callMain (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:170706:13)
at abort (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:164811:8)
at readAsmConstArgs (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:169000:10)
at _emscripten_asm_const_ii (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:165907:13)
at Array.W3 (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:125946:7)
at Array.dT (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:160270:19)
at o3 (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:104256:25)
at Module._main (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:169925:31)
at callMain (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:170706:13)
at doRun (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:170744:21)
at run (http://localhost:8000/target/asmjs-unknown-emscripten/release/gui_web1.js:170756:3)
I also ran into this problem
My understanding is emscripten builds are broken on both stable and nightly for rustc since November 2019: https://github.com/rust-lang/rust/issues/66916. With just cargo build --target <some emscripten>
you will get the error here. With cargo web build --target <some emscripten>
you will get a linker error. That has been my experience. I used a september 2019 toolchain with success. rustup toolchain add nightly-2019-09-15
and cargo web +nightly-2019-09-15 build --release asmjs-unknown-emscripten
.
Thank you! I wondered if this was the case. I will give the old toolchain a shot
Hello! I'm trying out stdweb with emscripten (1.39.10) and running into an issue when calling
stdweb::initialize()
:Here's my Cargo.toml:
And my program:
Compiling via:
Then I do
cp target/wasm32-unknown-emscripten/debug/echo.{js,wasm} /path/to/echo-web
and I have a very simple index.html that loads theecho.js
file. The above error occurs. Note that is does print "init" in the console, but does not print "loop." I get the same result in both Chrome/FF (latest versions).Am I doing something wrong? Thanks!