I'm playing with wasm-gc function references and WebAssembly.Function and I'm able to define a js function and pass it as argument to a wasm function that does a call_ref to it but if I want to pass struct/array refs to it I have to define them as anyref and cast them in wasm, is there a way to define a WebAssembly.Function in js with ref types that are more specific than anyref? (refer to structs/array types defined in the wasm module)
here's the code I wrote:
here's how I call it:
here's an explanation of the code: https://marianoguerra.org/posts/bootstrap-post-collapse-oop-technology-with-wasm-gc-part-2/
Last updated: Nov 22 2024 at 17:03 UTC