https://kotlinlang.org logo
#announcements
Title
# announcements
m

Mike R

08/09/2019, 2:50 AM
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

jw

08/09/2019, 2:51 AM
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

Mike R

08/09/2019, 2:52 AM
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

jw

08/09/2019, 4:12 AM
Kotlin/Native? currently no, as far as i'm aware
m

msink

08/09/2019, 4:27 AM
Kotlin/Native can cross-compile to Linux on Windows and Mac hosts, but Windows requires Windows and Mac requires Mac.
👍 1
😞 1
s

serebit

08/09/2019, 4:51 AM
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

Dominaezzz

08/09/2019, 10:43 AM
Your teammate can also ask for help here, especially since you have access to the developers themselves.
8 Views