-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
wasm-validator errors when trying to compile rust-brotli to wasm32 #42518
Comments
Some libc definitions are wrong for emscripten target, see rust-lang/libc#610. Here is a small example that fails to compile: use std::fs::File;
use std::io::{Seek, SeekFrom};
fn main() {
let mut f = File::open("x.txt").unwrap();
f.set_len(5).unwrap();
f.seek(SeekFrom::Start(2)).unwrap();
} It works for asmjs (I think because there is no validation), but fails for wasm32. The error is:
The problem is that After the libc PR get merged, it is necessary to update libc in rust. Well, I hope this assertions are correct, after all, the tests are green. |
Still doesn't compile on nightly :( |
Triage: Is this still a problem 6 years later? (If it would be easy to check I would check myself, but doesn't seem easy to check.) |
Triage: Assuming not a problem any longer. Closing. |
rustc
stable: rustc 1.17.0 (56124ba 2017-04-24)rustc
nightly: rustc 1.19.0-nightly (76242ae 2017-06-06)emcc
:I tried to compile Dropbox's rust-brotli to Wasm32 and the results look like this, on both Rust stable and nightly:
Note that the base library that it uses for decompression, compiled alright in all combinations.
I also tested on a "Hello World" binary and all compiles ok.
Here are the logs(sorry, these are to big for gist and also Git doesn't want to accept the archive in this issue) for
cargo +nightly build --target=wasm32-unknown-emscripten --verbose
:The text was updated successfully, but these errors were encountered: