
krusty
A Kotlin compiler written in Rust.
A drop-in replacement for kotlinc on the JVM: the same command-line flags in, and .class files byte-for-byte identical to kotlinc's out, from a single native binary.
Download · Source · Supported language
Usage
krusty src/ -d out/ # compile to a class directory
krusty src/ -d mylib.jar -module-name mylib # or to a jar
krusty -cp deps.jar:classes/ App.kt -d out/ # with a classpathBinaries for Linux, macOS and Windows (x86_64, arm64) are on every release. From source: cargo build --release -p krusty-cli.
What it does
- Output is diffed against the real
kotlinc: class files,@kotlin.Metadata,.kotlin_module. - Every build runs JetBrains'
codegen/boxsuite; the badge shows the pass rate. - kotlinx.serialization and KSP are supported.
krusty-lspis a Kotlin language server on the same compiler, with a Zed extension.