Hi, I am trying to identify what is missing in Wasmtime to be able to run .wasm files generated by Kotlin/Wasm (currently in early stage, only V8 is supported).
I would be interested to know for the unsupported proposals if related work is already planned in 2022 (especially outside of Cranelift) and the areas where specific help would be welcomed.
I've been interested in having the Exception Handling proposal supported in Wasmtime, so I looked into possible ways to implement it. There's been some prior discussion in issues #2049 and ...
In wasmtime, GC tracing of reftype pointers currently works by using libunwind to iterate over stack frames, fetching a stackmap for each relevant PC and finding the stack slots with live pointers....
Hi Sébastien :wave: Very exciting to hear that you're looking into enabling Kotlin on Wasmtime!
We're definitely interested in supporting this work, and I'll say a few more things about the specific features below. But at a higher level, it might be good to join our biweekly Wasmtime calls and put this on the agenda there, so we can discuss how best to proceed. We'd gladly facilitate work on all of these, and help in whichever way we can :smile:
On the specific required but not-yet-supported proposals:
Exception handling is indeed not yet supported. We have a contributor who was potentially interested in working on it and should coordinate with her, but fundamentally would be interested in help on this.
Typed Function References are also not supported. Adding them shouldn't be too much work, and might be a great task to take on for someone wanting to familiarize themselves with the codebase. We'd be more than happy to mentor someone on this.
GC isn't currently too high a priority for us, because of how unstable the proposal still is. However, we'd very gladly mentor someone working on this, and provide reviews and other support. It'd probably make sense to start with discussing the overall approach, then implementing fundamental GC support, and only then starting with the aspects specific to the proposal, including the type system, etc
FYI I have created this related feature request on Binaryen side (GC to non GC conversion) since that would enable Kotlin/Dart support by "just" implementing exception handling support in Wasmtime. Feel free to add your :+1: in the GitHub issue if you like the idea.
Hi, As far as I know, a few GCed languages/platform are working on WASM support by leveraging the GC proposal: Dart Kotlin C#/.NET (even if they seems capable to generate non GC output) For now onl...