Skip to content

wasm-validator errors when trying to compile rust-brotli to wasm32 #42518

Closed as not planned
@lilianmoraru

Description

@lilianmoraru

rustc stable: rustc 1.17.0 (56124ba 2017-04-24)
rustc nightly: rustc 1.19.0-nightly (76242ae 2017-06-06)
emcc:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.37.13
clang version 4.0.0 (https://github.com/kripken/emscripten-fastcomp-clang/ a1ed3cfe03ddc6c3a581adc412276e7841df8e5f) (https://github.com/kripken/emscripten-fastcomp/ cd8feb18426289a8ed7a7ac9e5dac2ea663d09bf) (emscripten 1.37.13 : 1.37.13)

I tried to compile Dropbox's rust-brotli to Wasm32 and the results look like this, on both Rust stable and nightly:

  • [Pass] --target=asmjs-unknown-emscripten
  • [Pass] --target=asmjs-unknown-emscripten --features "no-stdlib"
  • [Fail] --target=wasm32-unknown-emscripten
  • [Fail] --target=wasm32-unknown-emscripten --features "no-stdlib"

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions