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?
not yet, but @fitzgen (he/him) is actively working on implementing it. It's a large project!
damn. in the meantime, is there any sort of native wasm runtime that DOES have it?
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
does jco -- which uses node/deno/bun -- have this support? I can't recall; we could ask @Guy Bedford
guessing not, though
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
I mean technically possible, I haven't checked if they have shims for wasi-gc yet
wasmtime does have tail calls, fwiw; gc is still WIP
minor nitpick: wasmtime does not do tail call optimization, i.e. it will not automatically turn call
s that are in tail position into return_call
s, 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
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
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: Nov 22 2024 at 16:03 UTC