wasmi
wasmi copied to clipboard
Implement the Wasm `gc` proposal
This is about adding support for the gc (garbage collection) Wasm proposal.
The gc Wasm proposal has been recently moved to Phase 4 and thus stabilization can be expected to happen soon.
Having gc support in wasmi will be an enabler for use cases and languages that rely on the garbage collection such as Python, Java, Ruby, Javascript etc.
Any progress on GC? It's needed for running Kotlin. (and probaly some other languages as well) Thanks!
Hi @frankkienl , there are some blockers before we can start implementing the Wasm GC proposal. However, it is planned to be implemented sometime in the future eventually. Though, it is a rather large proposal, so will still take some time until we are there.
May I ask what you need to use it for exactly with Wasmi?
Frank is one of our early adopters of Firefly Zero. We're looking into supporting some scripting languages. Some, like Python and JS, have self-contained interpreters written in C that we can run. But quite a few, like JVM languages or C#, rely on WasmGC.
Thanks for the info, that's good to know. I wasn't aware that there is such a big interest in Wasm GC for Wasm interpreters such as Wasmi. The Wasm gc proposal will eventually be supported by Wasmi.
What needs to be done before we can start implementing the Wasm gc proposal for Wasmi:
- Merge https://github.com/wasmi-labs/wasmi/pull/1141
- Implement Wasm
function-referencesproposal since Wasmgcproposal builds upon it.
@orsinium For Firefly-Zero, I think the new Wasm custom-page-sizes proposal might be of interest to you: https://github.com/wasmi-labs/wasmi/issues/1197
I think the new Wasm custom-page-sizes proposal might be of interest to you
It might! We're keeping an eye on it at tinygo team. I had to hack around page sizes for mechanoid and gamgee. Luckily, Firefly Zero is not that constrained, we can fit 64 Kb pages without much problems.
For posterity:
Curiously, I've faced this issue with a Rust project. When trying to run a project using piccolo (specifically, this fork: https://github.com/kyren/piccolo/pull/113), I got the following error:
parse: heap types not supported without the gc feature (at offset 0xc2)
Update: the issue is introduced by wasm-opt if you don't disable GC feature.