Then I build with the wasm32-unknown-emscripten target, and attempt to load my emscripten-built program in a browser. The terminal logs Unwind_GetIPInfo, though the JavaScript console has additional information:
shell.html:1246 thread 'main' panicked at 'assertion failed: validate_hidpi_factor(dpi_factor)', .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.18.0/src/dpi.rs:236:9
printErr @ shell.html:1246
shell.html:1237 Unwind_GetIPInfo
shell.html:1246 Unwind_GetIPInfo
printErr @ shell.html:1246
shell.html:1246 warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling
printErr @ shell.html:1246
shell.html:1246 exception thrown: abort("Unwind_GetIPInfo") at Error
at jsStackTrace (http://localhost:8000/target/wasm32-unknown-emscripten/debug/test.js:1106:13)
at stackTrace (http://localhost:8000/target/wasm32-unknown-emscripten/debug/test.js:1123:12)
at abort (http://localhost:8000/target/wasm32-unknown-emscripten/debug/test.js:11659:44)
at __Unwind_GetIPInfo (http://localhost:8000/target/wasm32-unknown-emscripten/debug/test.js:6684:7)
at __ZN3std3sys4unix9backtrace7tracing3imp8trace_fn17hc6f9b7d159d84b8eE_llvm_5A0A6270 (wasm-function[19973]:82)
at dynCall_iii (wasm-function[20472]:16)
at Object.Module.dynCall_iii (http://localhost:8000/target/wasm32-unknown-emscripten/debug/test.js:11402:92)
at __Unwind_Backtrace (http://localhost:8000/target/wasm32-unknown-emscripten/debug/test.js:9861:40)
at __ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h4d215aadcaa52ebeE (wasm-function[19972]:63)
at __ZN3std10sys_common9backtrace5print17h82720234d7357f67E (wasm-function[19812]:143)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
The message has two suggestions, building with -s ASSERTIONS=1 or -s DEMANGLE_SUPPORT=1. Presumably these are options to emcc. @arturo did you try these options? I'm not sure how to pass them to emscripten through cargo. Has anyone got this working?