You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get WasmEdge to be able to invoke a WASM function compiled in AssemblyScript. I can get it to work by passing simple types (int32, int64) but trying to get it to work with more complex types (e.g. string) is more difficult.
As I understand it the memory for the string argument would need to be allocated/deallocated from within the compiled AssemblyScript - I see this technique is used for the Rust/GoLang examples, but its not clear to me what those allocate/deallocate functions would look like for AssemblyScript, or for other languages (e.g. Python? Java?). Do you have any plans to create some examples for languages other then GoLang and Rust?
The text was updated successfully, but these errors were encountered:
We don't have such a plan. The Rust/GoLang examples decode the allocate/deallocate from the compiled wasm. The cost is translating the memory layout between host memory(Python/Java) and guest memory(Wasm).
A new proposal called the component model will allow developers to handle more complex data. We will integrate this instead of spending time on hardcoding conversion.
I've been trying to get WasmEdge to be able to invoke a WASM function compiled in AssemblyScript. I can get it to work by passing simple types (int32, int64) but trying to get it to work with more complex types (e.g. string) is more difficult.
As I understand it the memory for the string argument would need to be allocated/deallocated from within the compiled AssemblyScript - I see this technique is used for the Rust/GoLang examples, but its not clear to me what those allocate/deallocate functions would look like for AssemblyScript, or for other languages (e.g. Python? Java?). Do you have any plans to create some examples for languages other then GoLang and Rust?
The text was updated successfully, but these errors were encountered: