Stream: SIG-Guest-Languages

Topic: WIT sandwich problem


view this post on Zulip Mossaka (Joe) (Oct 04 2024 at 02:42):

#wasi > multiple worlds and the tool sandwich problem

I want to bring attention to a potential issue that other languages might encounter, similar to the "WIT sandwich" problem we experienced with Go. The core of the problem is that the WIT package is required both before and after code compilation.

Proposed Solution

The solution we’re considering involves embedding the WIT package into Wasm custom sections during the language compilation/toolchain process. This would make it easier to componentize the module post-compilation and I believe this is how cargo-component doing today.

However, there’s currently a lack of documentation and conventions on how to embed the WIT package into Wasm custom sections. My intention for this message is to collaborate on standardizing this as part of the Component Model specification in #SIG-Guest-Languages .

Would love to hear your thoughts on how we can move this forward.

CC @Randy Reddig @Luke Wagner @Alex Crichton for your contributions to this idea.

view this post on Zulip Alex Crichton (Oct 04 2024 at 15:19):

I'm happy to add more documentation ... somewhere? (unsure where, probably at least wasm-tools) as to what the current state of the world and how wasm-tools component embed works

view this post on Zulip Mossaka (Joe) (Oct 04 2024 at 20:55):

document how wasm-tools component embed works is definitely helpful!

view this post on Zulip Alex Crichton (Oct 06 2024 at 20:35):

I've written up some words here, but lemme know if it's missing anything or unclear

We read every piece of feedback, and take your input very seriously.

Last updated: Nov 22 2024 at 16:03 UTC