Stream: general

Topic: Funcref


view this post on Zulip Daniel Hillerström (Jun 15 2022 at 15:08):

What's the implementation status of the function references proposal in wasm-tools & wasmtime? To me it seems to be implemented already behind the flag reference-types. Is there any left to be done implementation-wise?

view this post on Zulip Alex Crichton (Jun 15 2022 at 15:35):

The reference-types feature in Wasmtime is fully implemented but it only has the funcref type as opposed to typed function references. It also only encompasses the reference-types proposal for wasm which I don't think has instructions like call_ref, it's only loads/stores from tables with funcref

view this post on Zulip Alex Crichton (Jun 15 2022 at 15:38):

glancing at the function references proposal I don't believe any of that is implemented in wasmtime, and some bits and pieces may be implemented in wasm-tools but only for the gc feature if so

Proposal for Typed Function References. Contribute to WebAssembly/function-references development by creating an account on GitHub.

view this post on Zulip Daniel Hillerström (Jun 15 2022 at 15:43):

Thanks Alex. I see, so the typing aspect of references is missing and the new instructions (admittedly I had only looked at the syntax&static semantics so far). It seems the let-form has not been implemented in the tools either.

view this post on Zulip Alex Crichton (Jun 15 2022 at 15:44):

ah yeah let definitely isn't implemented in Wasmtime and I don't recall it in wasm-tools either

view this post on Zulip fitzgen (he/him) (Jun 15 2022 at 15:57):

fwiw, there is a lot of ongoing discussion about let and I'm not sure whether it is actually going to be part of the spec or not, so I would implement that last as far as the typed function references proposal goes

https://github.com/WebAssembly/function-references/issues/44

We have heard from multiple directions (interpreters, toolchains, debuggers) that let is (surprisingly) hard to implement/use. As I am looking into implementing let in V8's non-optimizing compi...

Last updated: Dec 23 2024 at 12:05 UTC