We need to pass complex data types,
The most complex data type is list<dict<string,string>>.
JSON seems appropriate as all languages have libraries for it.
This would not be needed if instead of modules as tasks we used components with WIT which support complex data types. However wasmtime-dotnet does not support components as of now.
WebAssembly supports only ints as return and parameter types without WIT.
Likely solution:
We have a shared memory.
For each data transfer:
serialize to json using library
write the json to shared memory
create a struct in shared memory which holds 2 numbers: ptr to json and len how many bytes it is.
in the transferring function return pointer to this struct struct_ptr
host or guest reads ptr and len from shared memory using struct_ptr
host or guest reads json from shared memory using ptr and len
parse using libraries
ACTION: Refactor to use stdin for input parameters and stdout for output parameters and taskinfo
We need to pass complex data types, The most complex data type is list<dict<string,string>>. JSON seems appropriate as all languages have libraries for it.
This would not be needed if instead of modules as tasks we used components with WIT which support complex data types. However wasmtime-dotnet does not support components as of now.
WebAssembly supports only ints as return and parameter types without WIT. Likely solution: We have a shared memory. For each data transfer:
ptr
to json andlen
how many bytes it is.struct_ptr
ptr
andlen
from shared memory usingstruct_ptr
ptr
andlen
ACTION: Refactor to use stdin for input parameters and stdout for output parameters and taskinfo