Skip to content
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 Compilation fails with exceptions - Few libraries needs to be upgraded #165

Open
sendilkumarn opened this issue Sep 27, 2018 · 6 comments

Comments

@sendilkumarn
Copy link
Contributor

sendilkumarn commented Sep 27, 2018

error[E0412]: cannot find type `c_int` in this scope
 --> /Users/sendilkumar/.cargo/registry/src/github.com-1ecc6299db9ec823/miniz-sys-0.1.10/lib.rs:7:24
  |
7 | pub const MZ_NO_FLUSH: c_int = 0;
  |                        ^^^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
  |
5 | use std::os::raw::c_int;

most of the errors are from std::os::raw::c_* in libraries like miniz-sys memchr etc., which are from the other libraries.

cc: @Yoric

@Yoric
Copy link
Collaborator

Yoric commented Sep 27, 2018

Is this something we can do ourselves by just bumping up dependencies or should we contribute patches to other crates?

@sendilkumarn
Copy link
Contributor Author

We can try bumping things, I think most of the crates were updated to handle wasm

@Yoric
Copy link
Collaborator

Yoric commented Sep 28, 2018

PR welcome :)

@sendilkumarn
Copy link
Contributor Author

A bulk of the errors were from flate2 lib which is not wasm-compatible yet. Let us wait till it gets ready 👍

Also, we have to move to wbg-rand instead of rand will that be okay? (since rand crate is not wasm compatible)

@Yoric
Copy link
Collaborator

Yoric commented Sep 30, 2018

A bulk of the errors were from flate2 lib which is not wasm-compatible yet. Let us wait till it gets ready 👍

Is that because of the C code?

We could either switch to libflate or use the experimental option in flate2 to avoid C code. Would you be willing to try these options?

Also, we have to move to wbg-rand instead of rand will that be okay? (since rand crate is not wasm compatible)

Sounds good. We're using randomness only for testing purposes, so it shouldn't affect our features.

@sendilkumarn
Copy link
Contributor Author

@Yoric I am waiting for this to be released rust-random/rand#520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants