-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emscripten builds broken on nightly? (Linking errors in fresh "hello world" crate) #66916
Comments
I can reproduce this too, FWIW, with a couple more warnings at the start, though I'm not sure if it's relevant:
|
triage: Needs reduction to MCVE. P-high. Removing nomination. |
Ping? still broken on latest nightly (3761dcd 2020-01-28) Would really appreciate a fix that could land in the next stable (this is basically the only way to test that code works(not just compiles) on wasm) |
* rust-bitcoin/master: Fix no-std raw test, after removal of lang items Fix broken benchmarks Disable emscripten tests until they work again rust-lang/rust#66916 rustwasm/team#291 Add constant of the prime of the curve field. Simplify callback logic to returning raw coordinates Removed no longer used dont_replace_c_symbols feature Fix wrong feature name external-symbols Fix missing return c_int in NonceFn
This reverts commit aef96cb, commit 1b2d0a3, and commit 82214dc. The wasm32-unknown-emscripten target is not very well supported right now, from build issues in instant/winit to toolchain issues (rust-lang/rust#66916). So let's not go down that route for now.
Example: https://github.com/Revlin/wasm-rust-emscripten
|
Was looking forward to using Rust in an ASM.JS project (wasm2js), found this bug, which has clearly been around for a year and a half with no fix. wasm_bindgen doesn't support ASM.JS at all, it gives back garbage after conversion from wasm. Therefore, I looked towards the emscripten targets so I could potentially use emscripten's asm to access JS without wasm_bindgen. And it's broken. We both know it'll never get fixed. You'll just kill off the emscripten targets and pure WASM will be required forever more. |
For the Latest builds using Rust 1.59.0 and emscripten 3.1.8 are broken from the main thing, which can be fixed by fixing some stuff before entering the cmd: @echo off
call emsdk/emsdk_env >NUL 2>NUL
set EMCC_CFLAGS=-s ERROR_ON_UNDEFINED_SYMBOLS=0 --no-entry
cmd /k Now that it builds however, you will still get So the generated binary seems to be broken, hmm Edit: This seems to be related to the way emscripten works. It may very well not be broken, but it needs additional js to setup the env properly. Please see So it seems what we're encountering isn't something that's broken, but something that's more unfinished in generating the output, as Rust doesn't set these up properly |
I think the problem is that |
Interesting! What version of Emscripten are you using @hoodmane? |
Well I just checked it on v3.1.6 (Feb 24 2022), 3.1.13 (Jun 3 2022), and tip of tree. I am pretty sure it also works on 2.0.24 (Jun 10 2021). |
Personally I was also trying the latest version and got these errors. But I was also using it with an already existing library (tree-sitter), and trying to compile it together with the rust module. |
Visiting for P-high review @rustbot claim |
I have the current nightly (did rustup update today), current cargo-web (0.6.26), and if I do
cargo new
followed bycargo web start --target=wasm32-unknown-emscripten
, I get linking errors.Same error occurs on nightly-2019-11-25. Also occurs when the target is asmjs-unknown-emscripten. The build succeeds on stable (1.39.0), and succeeds on nightly when the target is wasm32-unknown-unknown.
Example commandline output:
The text was updated successfully, but these errors were encountered: