-
Notifications
You must be signed in to change notification settings - Fork 67
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
Dynamic Linking: imports module name #135
Comments
bump |
The current DLL linking that exists in emscripten (and in draft form here) does not use a two level namespace. All symbols that take part in the DLL linkable will appear under "env". This is mostly for historical reasons and the plan is to move away from that. How are you declaring the name of the module you want |
That's nice. I was wondering if this was intended/planned behavior, so if it's just for historical reasons that is a good answer to my question.
I'm not declaring the import name of I guess it is not a pressing problem, but my first instinct was to have separate maps for host functions and module functions, so it's easy to differentiate between them. But tagged unions work just fine in that case as well so it's probably not such a big deal. Regardless, thank you for your answer. |
Now is probably a good time to revisit this, as we are developing the next generation of dynamic linking. |
Hello,
I have been experimenting with wasm dynamic linking, and have a question. If I define a module
foo
which depends on the functionf
in modulebar
, using the--shared
linker flagbar
gets put into the dylink section offoo
. The functionf
gets put in the import section along with the other needed globals and memories etc. However, the module name argument of the import off
isenv
, and notbar
. So the import becomesenv.f
and notbar.f
.Is this intended behaviour? And if so, why? I would expect the module name for the import to be the actual name of the module the import originates from. It also seems logical to have the module name
env
reserved for imports that the interpreter provides, such as functions to interact with the interpreter.The text was updated successfully, but these errors were encountered: