-
Notifications
You must be signed in to change notification settings - Fork 58
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
Need to be able to link against other .wasm
files
#22
Comments
Sounds like job for wasm-link from wabt. |
My understanding is that when However, using |
Given the discussion over in cargo about post build scripts I doubt this will be the route to go. I think getting lld linker support in sooner would be the most bang for our buck as having linker support helps with other issues as well. wasm support has already been moved to upstream lld so I think this is only a matter of time till we can get it integrated into rustc. |
yeah sadly post build scripts have been rejected which would have made many things a bit easier :/ For this feature we should probably wait until we can integrate LLD into rustc or ship lld together with rustc or similar. |
@fitzgen I agree yeah that when we have lld this will probably just go away. At that point there will be a semi-standard format (I think) of "wasm object files", and I'd imagine at that point you'd just use archives and |
With LLD I believe this is now possible. Currently the foreign files need to just be compiled with clang 6 and otherwise we should be good to go. Now that being said I think there's still a long way to go here. I'm not sure if the "object file format" is well documented or if it's easy to write a "wat" file by hand. Furthermore crates like |
There are places I'd like to write WAT directly, compile it into a
.wasm
inbuild.rs
(or maybe just check in the compiled.wasm
file into the repo since it is architecture independent), and then link that.wasm
into my top levelcdylib
crate.The text was updated successfully, but these errors were encountered: