Hey guys, can anyone explain to me, from android d...
# kotlin-native
n
Hey guys, can anyone explain to me, from android dev perspective, what is kotlin native? I read about it and i get the point that it compiles to native binaries, but is there something else to it. If i started typing it now how would it differ from regular android targeting code? Edit: basically the same just without the middleman JVM?
f
For a regular Android App use Kotlin JVM. With Kotlin Native you cant use any JVM libraries because it doesnt use the JVM. You could use it to compile your Kotlin Code e.g. to iOS
d
While it's technically possible to use Kotlin/Native on Android, there's probably no reason to ever do so. Kotlin Native is intended to target environments where the JVM is either undesirable or outright not available - iOS being a strategic one.
Sometimes the question of performance comes up... While Kotlin/Native could potentially end up having a small performance advantage over Kotlin/JVM, it certainly doesn't today, being far less mature, and even when it matures the gap would be small enough that it's unlikely to be the deciding factor between the two routes.
n
Thanks! I get the idea of Native now, seems cool, expecially for game dev.
a
I'd say game dev is not really the target - that's already kind of a solved problem with things like Unity where you don't use any native view components at all.