#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.
wasm-tools component embed
to embed necessary information into the component.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.
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
document how wasm-tools component embed works is definitely helpful!
I've written up some words here, but lemme know if it's missing anything or unclear
Last updated: Dec 23 2024 at 12:05 UTC