Hello,
I am currently working on calling a wasm-module with wasmtime and use them 
in my code. So far I have written the modules first in C and then compile 
it to wasm with emscripten and I have just used int/floats as an 
input/output to the wasm-module. Now I would like to use externref values 
as input/output to the wasm-module as I need to pass more complex data 
structures to a wasm-module. 
(https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md)
 

My goal is to have a C code which uses externref values and then returns a 
modified version of them. But I have problems to initialize and use 
externref values in the C code and then compile it to a wasm-module.

In the wasmtime documentation this wat file is given as an example. My goal 
is to create a similar wat file from a C code which has externref as 
input/output (param/result).

[image: Screenshot from 2022-10-10 16-25-14.png](In this example the 
wasm-module just returns the given externref value and doesn't modify it)
(https://github.com/bytecodealliance/wasmtime/blob/main/examples/externref.wat)

Does anyone know how to solve this problem? Or where should I look for a 
possible solution?

I appreciate any help with it.

Thank you very much.
Karl

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/ac06656b-e3cb-4d55-9959-c74fa595829dn%40googlegroups.com.

Reply via email to