What is the state of native code compilation for K...
# announcements
m
What is the state of native code compilation for Kotlin? My team at work is needing a compiled language without many dependencies and it is Kotlin vs Golang. The ability to compile kotlin to native code is appealing, but someone on my team said they had issues with building a binary for Windows?
j
You can always use the JVM backend which is the most mature and then use GraalVM native-image to produce a binary (assuming you're comfortable using GraalVM with its license).
m
Huh, interesting. I've never heard of GraalVM, I'll look into that. Thank you Jake!
Also to add onto my original question, can Kotlin cross compile?
j
Kotlin/Native? currently no, as far as i'm aware
m
Kotlin/Native can cross-compile to Linux on Windows and Mac hosts, but Windows requires Windows and Mac requires Mac.
👍 1
😞 1
s
There is an experimental target for compiling Windows binaries from Linux using Wine, but it isn't built into release versions of Kotlin/Native yet.
d
Your teammate can also ask for help here, especially since you have access to the developers themselves.