Hello,
Can somebody tell me if the externref.wat example (https://github.com/bytecodealliance/wasmtime/blob/main/examples/externref.wat) was written by hand or was it compiled from a different language to wat ?
Does anybody know if there is already support for "externref" reference types in a language which can be compiled to wat?
My goal is to use externref reference types in a wat-module as an input/output. But this wat-module should be written in a different language and then be compiled to wat.
I am currently trying to write a module in C and then compile it to wat with emscripten. But I have problems to initialize externref in the C code and then compile it properly to wat .
I appreciate any help.
Thank you very much.
Karl
That *.wat
file is written by hand, and while I think a number of languages might have experimental support for externref
I at least not personally aware of a language with first-class support
Thank you very much for your answer! Do you know where to find documentation for this?
Documentation for externref
itself?
My goal is to call a wasm-module with the externref type as input/output from a host code with wasmtime. Therefore, the wasm-module must support externref types. So far, I have written the wasm-modules by hand directly in wat similar to the example above. But now I would like to compile them from a different language. So, I can write an application in a different language and then compile them to wasm and call them from the host code. For example, compiling C code to a standalone wasm-module using emscripten.
Do you know where to find documentation for compiling a program to a wasm-module with externref support?
(It doesn't have to be for compiling C to wasm with emscripten, it can be for any other language/compiler)
Last updated: Nov 22 2024 at 16:03 UTC