-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm memory not exported ? #24
Comments
JWebAssembly does not used linear memory for data access. It is written for a GC. The linear memory contains only the class descriptions, string constants, etc. The program code that are not machine instructions. |
Maybe I don’t understand it correctly, I found that the webassembly specification should include the memory section: At present, the exchange of complex types of data and the host can only be passed through the linear memory of wasm. |
It can contain a memory section. It is optional. JWebAssembly use also a memory section but only for it internal data.
Via memory section you can only share pointers in a byte array. If your complex types are bytes in linear memory like in languages like C++ then this is valid. Java das not work with linear memory. The underlying memory manager of the VM can work with it. But this is a layer that JWebAssembly will not implement. The target of JWebAssembly is the usage of a GC and there complex object will be share by reference. |
Currently, data transfer is dependent on wasm's linear memory, but jwebassembly is not exported. Is it currently not supported?
I found out that both tinygo and teavm include memory export.
The text was updated successfully, but these errors were encountered: