NewsDeveloper ToolsProgramming Languages

Kotlin 2.4.20-RC: Native Compiler Binary, Swift Export, Wasmtime

Kotlin 2.4.20-RC dropped on August 12 with the feature the community has been requesting since at least 2021: a native kotlinc binary that does not touch the JVM. It is experimental, it is real, and it comes bundled with a set of multiplatform and JavaScript improvements that make the platform noticeably better to work with. Here is what matters.

The Native Compiler Binary

The headline is a native image of the Kotlin compiler — a drop-in replacement for the standard kotlinc command that runs as a native executable instead of a JVM process. JetBrains marks it Experimental, which is an honest label for a first release. Feedback is explicitly requested before it gets stabilized.

Why does this matter? Because the standard kotlinc carries a painful JVM startup overhead. Compiling a hello world program via kotlinc takes around 11 seconds in real time, most of which is JVM initialization. Rust compiles the same thing in under a second. That gap has not been a problem inside IntelliJ IDEA or Gradle — both manage JVM lifecycle themselves — but it is a genuine friction point for CI scripts, Makefiles, shell automation, and anything invoking kotlinc directly.

The native binary eliminates that overhead. If you want to try it now, download the build from the GitHub Releases page for 2.4.20-RC. It is worth comparing against TypeScript 7.0, which shipped its native Go-based compiler as GA in July with a 10x build speedup. Kotlin’s is earlier-stage, but the direction is the same.

Swift Export Gets More Usable

Kotlin Multiplatform’s Swift export feature — still Alpha — gets a meaningful workflow improvement in this RC. When you build an Apple target for SwiftPM consumption, Kotlin now auto-generates the Package.swift manifest alongside the XCFramework. Previously you maintained that file by hand.

For teams distributing KMP frameworks to iOS Swift codebases, this removes one of the more annoying manual steps. The generated manifest travels with the framework artifact, making it easier for iOS developers to consume the package without needing to know how Kotlin’s build system works. Full setup is documented in the Swift package export documentation.

One current limitation: if your KMP module itself consumes SwiftPM dependencies, you cannot yet export it as a Swift package. That gap is known and tracked.

Coroutine Debugging Gets Less Painful

A long-standing frustration with Kotlin coroutines is that exceptions produce incomplete stack traces. When a coroutine suspends and resumes, the JVM only shows the top frame — you lose the context of where the exception actually originated. The kotlinx.coroutines library has done best-effort recovery for a while, but only for exception types that fit a specific constructor pattern.

Kotlin 2.4.20-RC adds a StackTraceRecoverable interface to the standard library. Any exception class can implement it to participate in stack trace recovery without depending on kotlinx.coroutines directly. This lets library authors make their exception types debuggable in coroutine contexts. Recovery is JVM-only at runtime, but the interface is available on all targets.

Wasm and JS Updates

For teams doing server-side Kotlin/Wasm, the Gradle plugin now supports Wasmtime as a test runtime for the wasmWasi target alongside the existing Node.js option. Wasmtime is one of the leading standalone WASI runtimes. Being able to run your wasmWasi tests against an actual Wasm runtime rather than Node.js is useful for production-validity testing.

On the JavaScript side, two additions land together. First, an experimental DSL for browser testing that configures Mocha as the test runner and Playwright as the browser driver — covering Chromium, Firefox, and WebKit. Second, suspending lambda expressions can now be exported as JavaScript async functions, expanding the API surface your JavaScript consumers can reach from shared KMP code.

How to Try It

Update the Kotlin version in your build script:

// build.gradle.kts
plugins {
    kotlin("multiplatform") version "2.4.20-RC"
    // or for JVM-only projects:
    kotlin("jvm") version "2.4.20-RC"
}

The native compiler binary is a separate download from the GitHub Releases page. It is not bundled in the Gradle plugin yet — you invoke it standalone. Full feature details are in the official what’s new documentation.

Stable release timing is not announced, but RC releases for minor versions typically move to stable within two to three weeks. That would put 2.4.20 stable in early September. In the meantime, test against RC, report regressions, and particularly try the native binary if you have direct kotlinc invocations in your toolchain — that is the feature most worth stress-testing before it graduates from Experimental.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News