-
Notifications
You must be signed in to change notification settings - Fork 34
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
Problem when compiling for target wasm32-unknown-unknown #94
Comments
The answer here may be use remove the use of libc and use types from std::os::raw instead. |
Although it may be necessary to hide the APIs that accept FILE arguments. |
@jdm I tried what you suggested and the current state of my tests is here: It happens that it's still working fine on macOS (haven't tried other desktop OS yet) but if I include this crate in another project and build it with
|
@tanis2000 This crate uses a very old version of cc-rs to compile the C library, back when it used to be called gcc-rs. Try upgrading it to a modern version and updating build.rs and see if that makes a different. |
@jdm I upgraded the build.rs script to the latest cc-rs but it actually made things worse.
|
Sorry, that exceeds my ability to make guesses about solutions at this point. |
My guess is that I need to tell clang where the wasm32 sysroot is, but I have no clue myself. |
I've opened a PR with my changes where I switched from It still doesn't compile for wasm32 and I haven't yet found a way around it, but at least we have a starting point. |
was there a solution for this? |
This is somewhat connected to #91
When trying to compile for the wasm32 target (without emscripten) but with
cargo web build
, I get some errors due to the libc dependency.i.e.:
The text was updated successfully, but these errors were encountered: