Implement a C ABI for async import/export communication#1254
Conversation
This commit is an implementation of a solution for WebAssembly/component-model#485 for Rust. This should enable releasing multiple versions of `wit-bindgen` into the wild and have them all work together for now. Integration with `wasi-libc` will come in the future in theory.
Try to work around symbol/export trickery
Co-authored-by: Joel Dice <joel.dice@fermyon.com>
|
|
||
| /// Indirect "vtable" used to connect imported functions and exported tasks. | ||
| /// Executors (e.g. exported functions) define and manage this while imports | ||
| /// use it. |
There was a problem hiding this comment.
Note to self. Why am I making comments when I can't even visual what is meant by exporting a task?
|
@FrankReh I've edited a few comments as you suggested, and while I'm going to flag this for merge I'm happy to follow-up with anything. As you can see I'm not really high on the list to get any sort of literary award any time soon. My prose is definitely pretty ad-hoc and mostly referencing concepts in my head (e.g. "exported tasks") which are not official parts of the spec and while it makes sense to me we should update it to have something more official in the spec. That being said this is all in-flux as well as we figure out everything, so it's unlikely there's going to be a level of rigor in this documentation you, for example, might find with POSIX APIs. My hope is that this is mostly sufficient for now (at least I took the time to write something down?) and will be able to carry the implementation to the next iteration of everything. |
|
@alexcrichton As always, you surprise on the positive side. It is a pleasure to watch the spiral of ideas and implementations and concerns and stop-gap measures get tighter and tighter as wasi-preview3 takes shape. |
This commit is an implementation of a solution for WebAssembly/component-model#485 for Rust. This should enable releasing multiple versions of
wit-bindgeninto the wild and have them all work together for now. Integration withwasi-libcwill come in the future in theory.