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

[Idea] wasmtime dynamic library loading like with *.dll, *.so, *dylib in OS #4194

Open
redradist opened this issue May 28, 2022 · 3 comments

Comments

@redradist
Copy link
Contributor

redradist commented May 28, 2022

Feature

wasmtime dynamic library loading like with *.dll, *.so, *dylib in OS

Benefit

It will simplify loading a big application with it own dependencies

Implementation

It is implemented in bytecodealliance/wasmtime-cpp#25 (comment) as C++ class.
Lets consider the similar api for wasmtime that it would be available on all platforms

@redradist
Copy link
Contributor Author

@alexcrichton Could you involve people from your team to this discussion ?

@alexcrichton
Copy link
Member

My personal opinion on this is that this is probably a very ambitious issue and not the best place to discuss this. The issue description here is quite terse and doesn't convey details such as motivation, use cases, ecosystem interactions, etc. It's not 100% clear to me what you're shooting for so I'm assuming it's something akin to dynamic linking on native platforms where the general idea is that you can share a big was of code between programs by loading libraries at runtime. Designing such a feature for WebAssembly has large implications mostly on toolchains and how they work. For example while I believe Emscripten implements a form of dynamic linking I don't think it's been evaluated for off-the-web use yet.

Overall this would probably be best discussed in a larger forum that's not just the Wasmtime repository because the Wasmtime-specific pieces of this are likely to be quite simple compared to the toolchain and ecosystem changes necessary. Unfortunately I don't know the best forum in which to discuss this.

@redradist
Copy link
Contributor Author

redradist commented Jun 20, 2022

Yes it is about dynamic linking on systems like Linux, Windows and MacOS.
The reason is that it is not possible to merge all code in single wasm file.
The basic implement was done in simple class that I provided in wasmtime-cpp

I will try to start disscussion in different threads like reddit, T9 and so on

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

No branches or pull requests

2 participants