Does anyone know how to allocate memory and return a pointer to that memory in a Kotlin WASM function? All I can find is withScopedMemoryAllocator which only provides access within a callback so I can't return a pointer to it.
s
Svyatoslav Kuzmich [JB]
10/01/2024, 4:43 PM
This is not supported at the moment. All memory is “owned” by the scoped allocator.
s
Steele Nelson
10/01/2024, 4:46 PM
are there any plans to support it in the future? Our company is doing an initiative to create plugins with WebAssembly and the Kotlin devs are the only ones who can't make them Swift, TS, Rust, C# all support this.
s
Svyatoslav Kuzmich [JB]
10/01/2024, 4:59 PM
We are considering it as a part of the multi-memory proposal support. Devs would be able to define, export and import custom memories and manage them as they please. Do you think this would work in your case?
s
Steele Nelson
10/01/2024, 5:23 PM
I just read over the multi-memory proposal and I think it would.
b
bashor
10/01/2024, 7:07 PM
@Steele Nelson please file an issue and describe your case there