Stream: general

Topic: Does wasmtime support WasmGC?


view this post on Zulip Srayan Jana (Jul 19 2024 at 00:53):

I'm interested in using Hoot (https://gitlab.com/spritely/guile-hoot) and want to run it using wasmtime so i can integrate it into a C project. However, it depends on Tail Call optimizations and WasmGC. Does wasmtime support that?

GitLab.com

view this post on Zulip Chris Fallin (Jul 19 2024 at 00:55):

not yet, but @fitzgen (he/him) is actively working on implementing it. It's a large project!

view this post on Zulip Srayan Jana (Jul 19 2024 at 00:57):

damn. in the meantime, is there any sort of native wasm runtime that DOES have it?

view this post on Zulip Chris Fallin (Jul 19 2024 at 01:27):

depending on what you mean by "native Wasm runtime" (outside the browser perhaps?), Node might count; it has Wasm GC because it uses V8. I'm not aware of any other outside-the-browser / server-side VMs that do

view this post on Zulip Ralph (Jul 19 2024 at 10:05):

does jco -- which uses node/deno/bun -- have this support? I can't recall; we could ask @Guy Bedford

view this post on Zulip Ralph (Jul 19 2024 at 10:05):

guessing not, though

view this post on Zulip Ramon Klass (Jul 19 2024 at 10:13):

jco has separate wasi-shims for node and browsers, some functions are stubbed on either side, so it's possible that jco supports this, but only on browsers

view this post on Zulip Ramon Klass (Jul 19 2024 at 10:14):

I mean technically possible, I haven't checked if they have shims for wasi-gc yet

view this post on Zulip fitzgen (he/him) (Jul 19 2024 at 15:28):

wasmtime does have tail calls, fwiw; gc is still WIP

view this post on Zulip fitzgen (he/him) (Jul 19 2024 at 15:30):

minor nitpick: wasmtime does not do tail call optimization, i.e. it will not automatically turn calls that are in tail position into return_calls, but it does implement the tail calls proposal that introduces return_call et al and those are guaranteed to take O(1) stack usage, but it is the wasm producer's responsibility to signal whether they want tail calls or not via their instruction choice

view this post on Zulip Chris Fallin (Jul 19 2024 at 15:32):

I haven't checked if they have shims for wasi-gc yet

GC is a core Wasm feature, not a WASI API, so it's not something one can really shim with imports; one could in theory do a wasm-to-wasm code transform (binaryen might even have something like this?) but in jco's case, if they run on an underlying Wasm engine with GC, then there's no reason GC wouldn't work

view this post on Zulip Diego Antonio Rosario Palomino (Jul 30 2024 at 04:05):

Srayan Jana said:

I'm interested in using Hoot (https://gitlab.com/spritely/guile-hoot) and want to run it using wasmtime so i can integrate it into a C project. However, it depends on Tail Call optimizations and WasmGC. Does wasmtime support that?

Very interesting, is it a re implementation of Guile? The fact it has a more permissive license suggests so.


Last updated: Dec 23 2024 at 12:05 UTC