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

Fails to build with the asmjs-unknown-emscripten target #23

Open
yoanlcq opened this issue Mar 31, 2017 · 6 comments
Open

Fails to build with the asmjs-unknown-emscripten target #23

yoanlcq opened this issue Mar 31, 2017 · 6 comments

Comments

@yoanlcq
Copy link

yoanlcq commented Mar 31, 2017

cargo build --target asmjs-unknown-emscripten gave me the following output :

   Compiling libloading v0.3.4
error: failed to run custom build command for `libloading v0.3.4`
process didn't exit successfully: `/home/yoon/git/trust/fate-rs/target/debug/build/libloading-b2c9bb378ef0f558/build-script-build` (exit code: 252)
--- stderr
Building for an unknown target_os=`emscripten`!
Please report an issue 

Build failed, waiting for other jobs to finish...
error: build failed

Admittedly, loading dynamic libraries in Emscripten makes little to no sense, so this should be expected - I ran into this when trying to build my test project which depends on al-sys from alto.
I'm wondering what the desired behavior would be here. My gut feeling is that libloading should still compile, but produce no-ops, but on the other hand, the actual fix would probably to set libloading as an optional dependency of al-sys.

@nagisa
Copy link
Owner

nagisa commented Apr 1, 2017

https://github.com/kripken/emscripten/wiki/Linking

Seems to suggest that there exists a dlopen uh… fallback(?)… in emscripten. I will gladly merge a PR that implements loading for emscripten.

@yoanlcq
Copy link
Author

yoanlcq commented Apr 1, 2017

Interesting! I'd have looked into it, but I lack both time (currently) and expertise (in Rust and Emscripten), was just hacking around.
(About Alto, seems like OpenAL works out-of-the-box on Emscripten, so I should also reach out to them.)

@nagisa
Copy link
Owner

nagisa commented Jan 2, 2018

I’m not too interested in supporting emscripten target at this point. WASM backend is likely to replace the emscripten target in near future.

@GabrielMajeri
Copy link
Contributor

@nagisa Even if we ignore Emscripten, WebAssembly does support dynamic linking between modules using dlopen / dlsym (no dlclose though).

Should we close this issue and open a new one for WASM or keep this one and rename it?

@nagisa
Copy link
Owner

nagisa commented Jan 3, 2018 via email

@chayleaf
Copy link

chayleaf commented Dec 5, 2020

WASM backend is likely to replace the emscripten target in near future

wasm32-unknown-unknown doesn't support C interop, so it still has a very real use case

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

No branches or pull requests

4 participants