My goal is to compile a function written in Rust to WebAssembly which has as an input/output type externref.
Then I want to call this function as an export in Wasmtime. So, this function will receive an externref as an input and also return one.
The WebAssembly Code in the wat format should look similar to this:
(func (export "func") (param externref) (result externref)
... WebAssembly Code ... )
I have seen that there exists wasm-bindgen for browser hosts.
Is there a way to produce externref as an input and output for exports of functions written in Rust that can be called in non-web environments like Wasmtime?
My goal is to compile a function written in Rust to WebAssembly which has as an input/output type
externref.Then I want to call this function as an export in Wasmtime. So, this function will receive an
externrefas an input and also return one.The WebAssembly Code in the wat format should look similar to this:
I have seen that there exists
wasm-bindgenfor browser hosts.Is there a way to produce
externrefas an input and output for exports of functions written in Rust that can be called in non-web environments like Wasmtime?