What does the early version of Kotlin 1.5.30 suppo...
# kotlin-native
n
What does the early version of Kotlin 1.5.30 support in terms of platform code sharing with the C libraries (eg C pointers)?
s
Can you further clarify, maybe with code? I unfortunately, did not get the question!
n
Currently with Kotlin 1.5.20 in a new library (under development) there is a Canvas class defined in the common module:
Copy code
public expect class Canvas : Closable {
  // ...
}
In the linuxX64 module there is an actual implementation of Canvas which contains a pointer:
Copy code
public expect class Canvas : Closable {
  public val cairoPtr: CPointer<cairo_t>? = cairo_create(surface.surfacePtr)
  // ...
}
I want to be able to have a linuxCommon module where platform specific stuff for Linux (like the C pointers) can be shared across all Linux modules.