Stream: git-wasmtime

Topic: wasmtime / issue #4303 Transitioning from module linking ...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2022 at 15:36):

dicej opened issue #4303:

Per https://github.com/bytecodealliance/wit-bindgen/issues/259, I'm interested in upgrading the wasmtime dependency in wit-bindgen, and that has raised a more general question, which I'd like to ask here:

What's the vision for code which previously used module linking and will eventually need to transition to the component model? Will there be a simple recipe to follow, or will big (e.g. architectural) changes be necessary?

Whatever that vision is, I'd be interested to help implement it if there are opportunities to do so without distracting from the work already in progress.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2022 at 17:34):

dicej commented on issue #4303:

I hijacked today's wasmtime project meeting to discuss this and had a very enlightening conversation with @alexcrichton and @fitzgen about it. Here are my takeaways:

@alexcrichton perhaps you could clarify the last point, since I'm not sure I understood it. Would there be two variants of add_to_linker, one for modules and one for components? Or would both Linker types implement a trait so that add_to_linker could be generic? Or would component::Linker simply replace the module Linker and subsume the latter's functionality such that instantiating a module is the same as instantiating a trivial component containing a single module?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2022 at 14:26):

alexcrichton commented on issue #4303:

Sure yeah, my current thinking is that wit-bindgen will only generate one add_to_linker function which will only work with components, not with core wasm modules. Much of the component model only makes sense in the context of the component model itself (e.g. async, resources, streams, etc) so I don't think it will be possible to have a full-featured generated for "just" core wasm. This means that in the long run support for running raw core wasm files will likely be dropped from wit-bindgen since it'll work primarily at the ocmponent layer.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2022 at 14:28):

alexcrichton commented on issue #4303:

Also, for concrete work items, I'm trying to keep the main tracking issue up-to-date and the "Separate work items" category should all be issues that are standalone (ish) and possible to implement in parallel. (although I still wouldn't classify any of them as "easy")

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2022 at 16:33):

dicej commented on issue #4303:

I think the original questions here have been addressed, so I'm going to close this. Thanks for your help, Alex!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2022 at 16:33):

dicej closed issue #4303:

Per https://github.com/bytecodealliance/wit-bindgen/issues/259, I'm interested in upgrading the wasmtime dependency in wit-bindgen, and that has raised a more general question, which I'd like to ask here:

What's the vision for code which previously used module linking and will eventually need to transition to the component model? Will there be a simple recipe to follow, or will big (e.g. architectural) changes be necessary?

Whatever that vision is, I'd be interested to help implement it if there are opportunities to do so without distracting from the work already in progress.


Last updated: Dec 23 2024 at 12:05 UTC