Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank
No. 3487Tools index
Type
TOOL
GitHub
4 stars
Date

About

kc is a Kotlin compiler for the JVM written in Go. The author reports compiling real libraries 10x faster or more than kotlinc in a warm JVM, using about a tenth of the memory, because it skips the JVM, parses and generates code in parallel, and makes fewer passes. It is a prototype: it omits some language features, most of kotlinc's checkers, non-JVM targets, incremental compilation and IDE support.

At a glance

kotlin-compiler-go builds kc, a prototype Kotlin compiler for the JVM written in Go and licensed Apache 2.0. It turns Kotlin source into class files without starting a JVM. In the author's benchmarks on an M2 laptop, it compiled kotlinpoet, part of Ktor and kotlinx-coroutines-core 10 to 16 times faster than a warm kotlinc, using about a tenth of the memory. It is worth trying if compile time is your bottleneck, but it is not yet a drop-in replacement.

Good fit

Kotlin developers who compile JVM-only code from the command line or in CI, where kotlinc pays JVM startup on every build, and compiler enthusiasts who want to measure a parallel, single-pass design against the official compiler on their own libraries.

Consider something else when

Your project targets Kotlin/Native, JS or Wasm, depends on incremental compilation or IDE support, or needs the compiler to catch mistakes. kc reports only errors found during type checking, skips visibility checks and agrees with kotlinc on 79% of its diagnostics tests, so keep kotlinc as the build of record.

Start here

Build it with go build -o bin/kc ./cmd/kc, compile the bundled sample with bin/kc -d out testdata/run/fizzBuzz.kt, then run java -cp out FizzBuzzKt. Seeing FizzBuzz output means it works. For real code, pass kotlin-stdlib.jar and your other dependencies with -cp, because kc does not add the standard library itself. Add -features to see which unsupported feature each error hits.

Cost and requirements

Free and open source under Apache 2.0, the same licence as kotlinc. You need Go 1.27.2 or later and a JDK, plus the Kotlin standard library jar for most programs. Running the tests and benchmarks also needs kotlinc and hyperfine. There is no Gradle plugin; the repository includes an example Gradle init script that swaps a module's Kotlin compile task for a call to kc.

Limits to know

The author calls it a prototype that compiles most of Kotlin but not all, with unsupported features listed in its docs. It passes 95% of kotlinc's box tests. Output is functionally equivalent but not identical: for example, it shares inline-function objects where kotlinc copies them. There are no language-version settings, no incremental builds and no IDE integration.

Sources checked 2026-10-31. Source-based assessment.

Tags

kotlincompilergojvmperformancebenchmark

Tech Stack

Go

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.