for example, what is Pointer? what is Arena?
# webassembly
s
for example, what is Pointer? what is Arena?
n
WASM is one of the supported platforms in Kotlin Native, where Pointer (was that supposed to be CPointer?) and Arena are handled. CPointer ( https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md#pointer-types ) represents a C Pointer, and Arena is a area where heap memory is allocated/freed in a Kotlin Native program/library ( https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/-arena/index.html ).
s
it confuses me that Pointer, Arena and ArenaManager are redefined in the kotlinx.wasm.jsinterop package
and so these things have nothing to do with JsValue? so how to call a member function of a JavaScript object?
n
Best to wait for WASM support in Kotlin Native to evolve into something more tangible where the basic JS interop is reasonably solid.
s
originally I wanted to do some graphics things with Kotlin WebAssembly, but it turns out that pure WebAssembly can't utilize GPUs, and calling WebGL is a great pain
unless I make a special library function every time