https://kotlinlang.org logo
Title
s

SOFe

02/13/2019, 2:04 PM
for example, what is Pointer? what is Arena?
n

napperley

02/13/2019, 8:35 PM
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

SOFe

02/14/2019, 4:47 AM
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

napperley

02/15/2019, 6:06 AM
Best to wait for WASM support in Kotlin Native to evolve into something more tangible where the basic JS interop is reasonably solid.
s

SOFe

02/16/2019, 11:26 AM
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