Kotlin/Native v0.6 is Here!

We are pleased to announce Kotlin/Native v0.6 (Valentine’s Day release) of our toolchain. This is a major update, including the following features:

  • Support for multiplatform projects in compiler and Gradle plugin
  • Transparent Objective-C/Kotlin container classes interoperability
  • Support first embedded target (STM32 board)
  • Kotlin 1.2.20, Gradle 4.5 and Java 9 supported
  • Smaller WebAssembly binaries (basic applications is around 160KiB now)
  • CLion plugin update for CLion 2018.1 (fixed the issue with macOS platform libraries indexer)

With v0.6 we brought Kotlin/Native multiplatform projects support, so same Gradle build could be used for different Kotlin backends, such as JVM, Native and JS. See this repository for usage example.

Also, we finally provide an ability to create Kotlin/Native programs aimed for embedded targets, such as STM32-based microcontrollers (using Zephyr Project kernel). Note that support is still experimental so your mileage may vary, and there are some shortcomings around C interoperability, which will be fixed in upcoming releases.

One interesting feature of v0.6 is support for transparent collections interoperability in -produce framework operational mode. It means, one could transparently use Kotlin’s List, MutableList, Set, MutableSet, Map and MutableMap as Objective-C/Swift collections, such as NSList, NSMutableList, NSSet, NSMutableSet, NSDictionary and NSMutableDictionary respectively, when compiling Kotlin code to the framework.

An important goal of this release was to improve usability and stability of the compiler, so we fixed a number of known bugs and Kotlin/JVM incompatibilities.

And finally, a plugin for CLion 2018.1 with support for Kotlin/Native v0.6 is available. Due to certain technical reasons, it’s not possible to automatically update to the new version this time, so you need to manually install it from here.

Enjoy this release, and may love be with you!

Binaries can be downloaded from the following links: macOS, Linux, Windows

GitHub release page is here.

This entry was posted in Native, Releases, Tools and tagged . Bookmark the permalink.

18 Responses to Kotlin/Native v0.6 is Here!

  1. Scott says:

    Congrats! Any word on when we’ll get debug support for setting breakpoints on Kotlin code in the IDE when using any sort of code-share with iOS? That’s the only thing now stopping my team from diving in (now that multi-platform is supported).

    • Vyacheslav Karpukhin says:

      This should already be working when you set breakpoints in Xcode. Just do something like “br set -f KotlinFile.kt -l 42” in LLDB console, or add the kotlin files to the project (don’t include in any targets) and set the breakpoints from UI.

      • Scott says:

        I can’t seem to get it to let me set breakpoints from the UI after adding kotlin files to the project.

        How should I be adding kotlin files to the project? In the Project Navigator I was right clicking and then clicking ‘Add Files to “”‘. I could see the files, but I couldn’t set breakpoints.

        Using the br set -f KotlinFile.kt -l 42 command did work though. I’d really love to get setting the breakpoints in the UI working.

        • Vyacheslav Karpukhin says:

          I’ve mistakenly assumed that Xcode would allow to set breakpoints even on unknown files, but apparently it doesn’t. I apologize for the confusion. Looks like the only way to do it from Xcode UI is to step into the Kotlin code from Swift/Objective-C.

        • Jose Rojas says:

          It works in AppCode. You can set breakpoints in the Kotlin file and the Swift source and debug away. The only thing that doesn’t seem to work though is the pretty printing using the kotlin_lldb.py util from the variables consoles. This does work in XCode, although rather slowly.

          • Jose Rojas says:

            Update: When I tested AppCode previously, I had CLion open with breakpoints set in Kotlin. There was some sort of cross-application settings that must have enabled the breakpoints in the AppCode project for the Kotlin source files which made it appear to work, although after closing CLion and restarting, I was not able to set breakpoints in Kotlin files within AppCode out-of-box.

            However I did get it to work. AppCode allows you to set File Type associations so you can set *.kt as a source file in your Settings. For example, I associated Kotlin as Assembly. After this tweak, AppCode allows my to set breakpoints in Kotlin files and have full support for Objective-C and Swift debugging. The disadvantage with this method is you’ll have to disregard the code editor parsing since the Kotlin language is not currently supported in AppCode.

            I’m guessing this will be coming soon to AppCode. Glad to see that it is so close fully working! AppCode isn’t XCode, but it is a great tool if you enjoy working with JetBrains product UIs.

  2. Hesam says:

    Wow, awesome. I came in to software engineering from embedded programming. It is wonderful to see you guys make me able to have fun with embedded programming. I always wanted to spend some time on embedded programming but writing code based on assembly/C/C++ is super time consuming. Hope to see Raspberry Pi support in future versions…

    • Nikolay Igotti says:

      Raspberry Pi is already supported for long time :). ‘-target raspberrypi’ is your friend.

  3. Gladson Reis says:

    Now can I create applications for Android and ios on kotlin? My Dream !!!

  4. jfh says:

    Great. Really interested in WebAssembly support. I’ll learn Kotlin if I can use it to target WebAssembly

  5. Mike says:

    Guys you are so cool! Maybe it’s a bit naive to ask but do we have a chance to see ESP32/FreeRTOS support?

  6. Nishad says:

    Awesome, you guys are doing great job. I chose my third language to learn is Kotlin after C++ and Java. Keep going, Good work :)

  7. Ivan says:

    Great!
    Will there be some way to develope apps for different platforms on one OS,and compiling for target platforms on on dedicated server with target OS?

    something like done in delphi(firemonkey) ?

  8. Guo says:

    Although kotlin can run on the STM32! That is incredible! ! ! “There are some shortcomings around C interoperability, which will be fixed in upcoming releases.” I need to be stable on kotlin for stm32 before I use it! Can you provide other RTOS support? For example, FreeRTOS, Rt-Thread, etc., you need to provide an RTOS port interface , we will port it!!

  9. fulo stene says:

    I want it,it’s incredible.

  10. Antoni Mysliborski says:

    What’s the status of it? is it something that could be used in production or is it still very experimental?

Comments are closed.