Compiling to Other Targets
In addition to all the capabilities that Kotlin offers, it’s one of the few languages that can be compiled to different targets.
-
On Android devices: Kotlin is considered a first-class language for Android development. We’ll explore using Kotlin to create Android applications in Chapter 20, Writing Android Applications with Kotlin.
-
To JavaScript: transpilation is compiling from the source code of one language to the source code of another language. You can see how to transpile Kotlin to JavaScript in Appendix 1, Transpiling to JavaScript.
-
To native targets: when compiling down to a virtual machine isn’t an option, Kotlin/Native can be used to compile your source code to different native targets like iOS, Linux, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access