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?)
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.
Would this also help for multiple components that link against (for example) a Python or Go runtime?
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.
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.
Victor Adossi has marked this topic as resolved.
Last updated: Nov 22 2024 at 17:03 UTC