Kotlin logo

Kotlin

A concise multiplatform language developed by JetBrains

News

Update Regarding Kotlin/Native Targets

Kotlin/Native supports many targets thanks to its LLVM backend – 27 as of 1.8.0, to be exact! While most of the heavy lifting is already being done by LLVM, we still have a lot of work to do. For example, we still need to:

  • Develop platform-dependent features like a memory manager.
  • Maintain and update platform libraries and dependencies.
  • Fix ABI-specific problems like calling conventions.

At the beginning of the Kotlin/Native project, we explored the possibilities and limits of the technology by adding different, sometimes exotic, targets. With the Stable release approaching, we, unfortunately, have to admit that we can’t support all targets equally well. 

iOS targets have a clear use case and a community that is already active. Other targets like linuxX64 and mingwX64, are a bit less popular, but supporting them does not take too much time. However, there are targets like linuxArm32Hfp that aren’t very popular but would require way more attention than we can give them to become usable beyond proof-of-concept projects.

To communicate our commitment to quality over quantity, along with the limitations that necessarily entail, we’ve decided to split the targets into tiers and deprecate some of them.

We’ve created a dedicated document that will be a single source of information about all Kotlin/Native targets, which we’ve split into 3 tiers depending on how well each is supported and has been tested. This tiered structure is a bit different than our typical Stable/Beta/Alpha classification, as a target can move into a higher or lower tier.

These target tiers should also help library authors decide which targets should be tested on CI and which ones can be skipped. The Kotlin libraries team will rely on it as well, which means that all non-deprecated Kotlin/Native targets are finally going to be supported by kotlinx libraries!

The following targets are marked as deprecated in 1.8.20 and will be removed in 1.9.20:

  1. iosArm32 – 32-bit iOS Apps were deprecated a long time ago, and the last iOS release that supported them was iOS 10, which was released back in 2016. Furthermore, as of version 14 the most recent release, Xcode no longer builds 32-bit binaries.
  2. watchosX86 – This is an obsolete simulator for Intel Macs. Use the watchosX64 target instead.
  3. linuxArm32Hfp – When it comes to 32-bit ARM, it is hard to provide a single universal Kotlin/Native target because of the variety of options: ARMv5, ARMv6, ARMv7; hfp, sfp; multiple toolchains; etc. To some extent, this is true for other Linux targets, but linuxArm32Hfp has proven to be especially hard to support.
  4. linuxMips32 and linuxMipsel32 – We haven’t seen any real demand for these two.
  5. mingwX86 – Support for this target requires a lot of resources while user demand remains low. Furthermore, mingwX64 is better suited for the majority of known use cases anyway.
  6. wasm32 – We’re deprecating this one in favor of the new fully-fledged Kotlin/Wasm toolchain. Check it out!

Our publication of the tier list does not mean that the set of Kotlin/Native targets is set in stone forever. We will continue to develop the compiler, cinterop, and tooling to make adding and maintaining targets easier, and as we do, new targets may make it onto the list.

We would like to thank you, our community, for your active participation and for providing feedback. We hope that having a better focus will allow us to improve your development experience further!

image description