Open yoanlcq opened 7 years ago
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.
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.)
I’m not too interested in supporting emscripten target at this point. WASM backend is likely to replace the emscripten target in near future.
@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?
I meant my comment to imply that wasm support is interesting to me. It would need more work as implementing dlopen/dlsym would be necessary (the functions are not provided).
Dlclose not being implementable doesn't seem like much of a problem.
On Jan 3, 2018 7:58 AM, "Gabriel Majeri" notifications@github.com wrote:
@nagisa https://github.com/nagisa Even if we ignore Emscripten, WebAssembly does support dynamic linking http://webassembly.org/docs/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?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nagisa/rust_libloading/issues/23#issuecomment-354942169, or mute the thread https://github.com/notifications/unsubscribe-auth/AApc0ijiu9edoo7QhVDSbnMaG-f3dBfzks5tGxcFgaJpZM4Mvn3v .
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
cargo build --target asmjs-unknown-emscripten
gave me the following output :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
fromalto
. I'm wondering what the desired behavior would be here. My gut feeling is thatlibloading
should still compile, but produce no-ops, but on the other hand, the actual fix would probably to setlibloading
as an optional dependency ofal-sys
.