Closed 996ccs closed 2 months ago
The returned value is a pointer to a WTF-16 string in the exported memory. The memory should be 65536 bytes long and should most definitely not be empty.
The returned value is a pointer to a WTF-16 string in the exported memory. The memory should be 65536 bytes long and should most definitely not be empty.
Thanks for your reply. On the browser platform memory is indeed 65536 bytes long data. The problem I encountered is that when using the third-party wasm runtime library on the ios platform, the wasmkit memory is an empty buffer array.
I'm afraid I don't know anything about this runtime, so I can't help in that regard.
I'm afraid I don't know anything about this runtime, so I can't help in that regard.
Okay, thank you again for your reply. I will close this issue.
Question
I am currently using the latest version of assemblyscript (0.27.27). I wrote a function to return the "hello world" string. In the browser, WebAssembly exported a memory module for conversion, but on the iOS platform, I used WasmKit, a third-party wasm runtime. Load the wasm file to parse wasm. The parsed instance object memory is an empty array buffer. How can I get the "hello world" string returned by the function on ios and Android platforms?
Below is my code
compile command
wat file
The result I expect is that calling the getHelloWorld function on iOS and Android using a third-party wasm runtime library can return the "helloWorld" string, but now calling the getHelloWorld function returns a number type number.