Coming soon: First stable release of Kotlin/Native IDE support

Kotlin/Native IDE support: CLion 2017.3 EAP now available for download

Gabriela Motroc

© Shutterstock / 13FTStudio

The availability of the first Technology Preview of Kotlin/Native which compiles Kotlin directly to machine code was announced six months ago and now we have a sneak peek at the IDE support. JetBrains’ choice for Kotlin/Native is CLion, their IDE for C and C++; CLion 2017.3 EAP is now available for download.

JetBrains has chosen CLion, their IDE for C and C++ for Kotlin/Native, Roman Belov wrote in a recent blog post.  CLion 2017.3 EAP (build 173.3622.10) is now available for download.

This build arrives with some changes and improvements in tow, including special icons to the left gutter for every main function in your project, Generate Definitionsfixes for better JUCE support and more.

Here are the changes made to CLion 2017.3 EAP:

You’ll find the release notes here. 


Update November 6, 2017

Kotlin/Native is a LLVM backend for the Kotlin compiler, runtime implementation and native code generation facility using LLVM toolchain. It is mainly designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS, embedded targets), or where the developer is willing to produce a reasonably-sized self-contained program without the need to ship an additional execution runtime.

JetBrains’ Andrey Breslav explained in a blog post announcing the availability of the first Technology Preview that Kotlin/Native is “another step toward making Kotlin usable throughout a modern application. Eventually, it will be possible to use Kotlin to write every component, from the server back-end to the web or mobile clients.”

SEE ALSO: Kotlin Native serverless tutorial: Fun with Fibonacci

Kotlin/Native IDE support

At KotlinConf 2017, JetBrains announced a preview release of development tools for Kotlin/Native. Unlike Kotlin (there’s IntelliJ IDEA for working with it), Kotlin/Native integrates with technologies from the native world such as Clang and LLDB support, which is why JetBrains has chosen CLion, their IDE for C and C++ for Kotlin/Native, Roman Belov wrote in a recent blog post.

If you want to take it for a spin, download and install CLion 2017.3  (at the early access preview stage right now), then install two plugins from the JetBrains Plugin Repository. In CLion, choose Configure → Plugins → Install JetBrains plugin…, then find Kotlin and Kotlin/Native plugins there, and install them.

Sample project

Click New Project → Kotlin/Native Application and select one of the available samples. CLion will automatically download and install native packages on your computer as needed.

According to Belov, Kotlin/Native IDE support is based on the regular Kotlin plugin for IntelliJ IDEA, so the specific code inspections, intentions, code completion actions and of course refactorings are already available for Kotlin/Native.

The CLion plugin supports debugging, based on LLDB (still under active development), as well as running tests written using the kotlin.test framework. At the moment, if you want to run a test, you’ll have to create a ‘Kotlin/Native Test’ run configuration (under Run → Edit Configurations…) manually. However, creating configurations from the editor popup menu will be supported in future updates.

Next in line: First stable release of Kotlin/Native IDE Support

There’s more to the first stable release of Kotlin/Native IDE support than the testing support, debugger, and IDE code insight. JetBrains will also “fully support interoperability with native libraries, with features such as documentation preview, cross-language navigation and, of course, refactorings,” Belov concluded. 

Read more about Kotlin/Native here

Gabriela Motroc
Gabriela Motroc was editor of and JAX Magazine. Before working at Software & Support Media Group, she studied International Communication Management at the Hague University of Applied Sciences.

Inline Feedbacks
View all comments