Kotlin 1.8.20: The Newest Update with Direct Connection to WebAssembly

Programming language Kotlin 1.8.20 brings direct connection to WebAssembly

Kotlin 1.8.20 has been released, bringing further innovation for the K2 compiler alongside some minor additions to the language itself. The K2 compiler should become stable in Kotlin 2.0, set for release in the future. One of the most exciting new features in Kotlin 1.8.20 is the integration of the Kotlin/Wasm build target, giving WebAssembly an explicit target platform.

The K2 compiler is said to be stable in Kotlin 2.0, according to a roadmap released back in February. JetBrains announced the implementation of the K2 frontend in December 2022. With Kotlin 1.7, it found its way into the programming language as an alpha, and the first compiler plugins for K2 followed in Kotlin 1.7.20. The current version now brings a preview of the serialization plug-in for the K2 compiler and offers a connection to the JS-IR compiler for JavaScript.

Kotlin 1.8.20 also brings some adjustments with the native connection to various platforms without the detour via the JVM. Seven platform targets for Kotlin/Native are marked as deprecated in the current release.

In the language itself, there are minor additions. The new property entries for enum classes are intended to replace the values() function. Kotlin 1.8.20 also brings additions for the Data Objects introduced in Kotlin 1.7.20 and allows secondary constructors with a body for inline classes.

JetBrains originally developed the Kotlin programming language for the Java Virtual Machine (JVM). Since then, it has been designed for several platforms. Kotlin/Native enables execution without a virtual machine, especially on platforms such as iOS, which do not have a JVM. With Kotlin/JS, a connection to JavaScript is also available, and since Kotlin 1.2, multiplatform projects can be created to cover JVM and JavaScript with a code base.

Kotlin 1.9, the last feature release of the 1.x series, is planned for release in July. Kotlin 2.0 is also set for release in the future, although it’s not yet known when.

Leave a Reply