Does anyone know how to allocate memory and return...
# webassembly
s
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
This is not supported at the moment. All memory is “owned” by the scoped allocator.
s
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
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
I just read over the multi-memory proposal and I think it would.
b
@Steele Nelson please file an issue and describe your case there
@Steele Nelson btw, which VM do you use?