Stream: wasmtime

Topic: ✔ The impact of extractable core modules?


view this post on Zulip Victor Adossi (Aug 23 2024 at 10:38):

Just a general question here, but I'm wondering what's the deeper impact of this PR:

https://github.com/bytecodealliance/wasm-tools/pull/1725

Is the idea that by being able to extract a core module form a component, a smaller bit can be moved around/put in different "shells" of components? Is the idea that a Engine could sort of... do a kind of layering of core module computation and component related computation (maybe dedup as well?)

This commit adds a new subcommand to wasm-tools component named unbundle which is tasked with extracting core wasm modules out of a component. This is intended to showcase an example implementation...

view this post on Zulip Alex Crichton (Aug 23 2024 at 15:03):

The main motivation was on the Wasmtime side of things of being more easily able to share object code yes. If multiple components use the same core wasm module today they each compile the module, but if they all import the same module then that object code can be shared instead of duplicated.

view this post on Zulip Joe Sylve (Aug 23 2024 at 22:02):

Would this also help for multiple components that link against (for example) a Python or Go runtime?

view this post on Zulip Joel Dice (Aug 23 2024 at 22:18):

Yeah, I think that's one of the goals: if multiple components use e.g. libpython312.so, wasmtime should be able to compile it once to native machine code and reuse the result.

view this post on Zulip Victor Adossi (Aug 24 2024 at 01:53):

Ahhh thanks ya'll! this makes a ton of sense now, the idea of sharing sounds like it could be a huge efficiency increase.

I didn't think of the case of shared library components but that's even more relevant.

view this post on Zulip Notification Bot (Aug 24 2024 at 01:53):

Victor Adossi has marked this topic as resolved.


Last updated: Dec 23 2024 at 13:07 UTC