Kotlin now officially runs stably as WebAssembly: JetBrains ships the final version 2.5, with support for Java 28 already on board
After two release candidates the new version is here, with Swift export in beta and a new format that makes multiplatform libraries much smaller.
JetBrains on Wednesday released Kotlin 2.5.0. The most important step is that Kotlin/Wasm, which runs Kotlin code as WebAssembly in the browser and elsewhere, is now stable and therefore intended for production. Binaries get smaller and behaviour is better aligned with the other platforms, although JavaScript interop and the Component Model are not yet covered by that guarantee, the release notes say. On the JVM side, the compiler already supports bytecode for Java 28, the version due in March 2027.
For those using Kotlin on iOS, Swift export moves to beta, with a new configuration DSL and the ability to generate a complete Swift package. Importing Swift packages such as Firebase or Google Maps is also in beta. An experimental publication format bundles a multiplatform library's artifacts into a single compressed archive: for one sample library, the number of files dropped from 7,539 to 1,036 and the size from 91 to 23 megabytes. Kotlin/JS gains an es2020 target, which among other things allows BigInt without extra configuration, AlternativeTo also reports.
In the language itself, name-based destructuring and a check for unused return values become stable, among other things. Full value classes, where the contents determine identity, and so-called companion blocks remain experimental. Running the compiler now requires at least JDK 17; an older JDK produces an error that can still be bypassed with a flag until version 2.5.20.