Did anyone tried to compile `compose-runtime` by K...
# compose
m
Did anyone tried to compile
compose-runtime
by Kotlin/Native? I did quick and dirty port, and it more or less works
🤞 2
👀 5
👍 3
Two main issues: 1. global objects in K/N are frozen, so
object Compose
must be annotated as
@kotlin.native.concurrent.ThreadLocal
https://github.com/msink/kotlin-libui/blob/34c04b2b53e872938707a1b1a547e8b055fcfaa3/compose-runtime/src/commonMain/kotlin/Compose.kt#L24
2. Many functions used in
class ObserverMap
are JVM-only, don't know how to port it.
a
Hey! Feel free to ping me in DM if you need any clarifications about ObserverMap
c
I recommend making
ObserverMap
an expected type, moving the current implementation as an actual type for Android, so you have more freedom in the K/N implementation.