Join Slack
Communities
Powered by
Does Kotlin native compile to bytecode or c?
# kotlin-native
s
Sam Stone
05/15/2022, 4:00 PM
Does Kotlin native compile to bytecode or c?
a
Alexander Black
05/15/2022, 4:05 PM
It compiles to native binaries depending on the CPU architecture. So if you're building for Arm64 it'll build ARM64 binaries or if you are building for X86 it will build X86 binaries. Byte code is used on the JVM and native does not use the JVM
e
ephemient
05/15/2022, 4:05 PM
https://github.com/JetBrains/kotlin/tree/master/kotlin-native#readme
"_Kotlin/Native_ is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain."
ephemient
05/15/2022, 4:06 PM
Kotlin compiler translates IR to LLVM IR (or bitcode) then calls LLVM to produce native code, C is not involved
👍 3
l
Landry Norris
05/16/2022, 3:01 PM
Note that using the cli compiler, you can have it stop at the llvm bitcode. They seem to have removed this functionality from the Gradle plugin.
8
Views
Open in Slack
Previous
Next