Open-Source Wikis

/

Kotlin

/

Compiler plugins

/

Other plugins

JetBrains/kotlin

Other plugins

Active contributors: Dmitriy Novozhilov, Kirill Rakhman, Andrei Shikov

A handful of smaller compiler plugins live alongside the headline ones. Each is interesting in its own right; together they round out the plugin landscape.

assign-plugin

plugins/assign-plugin/ lets a Kotlin class type-overload the = (assignment) operator for properties it owns, so that DSL builders can write myProperty = value and have it route to a method on myProperty instead of replacing the reference. Used by the Kotlin Gradle Plugin's lazy-property DSL among others.

KGP wrapper: libraries/tools/kotlin-assignment/. Maven wrapper: not applicable.

atomicfu

plugins/atomicfu/ is the compiler plugin that powers kotlinx.atomicfu — a library that gives Kotlin code zero-overhead atomic field updaters across all targets. The plugin transforms AtomicInt / AtomicReference declarations into platform-appropriate primitives (AtomicIntegerFieldUpdater on the JVM, simple atomics on Native, plain references on JS/Wasm where there's no concurrency).

KGP wrapper: libraries/tools/atomicfu/.

jvm-abi-gen

plugins/jvm-abi-gen/ generates ABI-only JARs from the JVM compiler output: jars that contain only declarations (signatures, annotations, default-method bodies) and not full implementations. Tools that perform incremental compilation use these stripped jars to detect "did the ABI change?" without re-compiling consumers when only an implementation body changed. Bazel's rules_kotlin and parts of KGP rely on this.

js-plain-objects

plugins/js-plain-objects/ adds support for Kotlin types that compile to plain JavaScript objects (no class hierarchy, no constructor) — useful for interop with JS libraries that expect literal { key: value } shapes. The plugin generates the right metadata so Kotlin code can declare such types ergonomically.

KGP wrapper: libraries/tools/js-plain-objects/.

power-assert

plugins/power-assert/ instruments calls to assert(...) (and a configurable list of similar functions) so that on failure, the runtime can print a value-by-value breakdown of the assertion expression — what each sub-expression evaluated to. The output looks like:

assert(actual.size == expected.size)
              |    |       |    |
              5    false   3    "expected"

Inspired by Spock and Groovy's similar feature.

KGP wrapper: libraries/tools/kotlin-power-assert/. Maven wrapper: libraries/kotlin-maven-power-assert/.

kotlin-dataframe

plugins/kotlin-dataframe/ is the compile-time schema generator for Kotlin DataFrame. It reads CSV / JSON / Excel headers and synthesizes typed accessor properties on dataframe instances so users get IDE auto-complete and type-safe row access without runtime reflection.

KGP wrapper: libraries/tools/kotlin-dataframe/. Maven wrapper: libraries/kotlin-maven-dataframe/.

scripting

plugins/scripting/ is the compiler-side of the scripting story — it sees .kts files and configures the compiler appropriately. The user-facing scripting API and host live in libraries/scripting/ (see scripting).

plugin-sandbox

plugins/plugin-sandbox/ is a teaching-and-testing plugin: a small, well-commented FIR + IR plugin meant as a starting point for learning the plugin API, plus a place to test plugin-extension behavior in isolation. Excellent reading material for anyone writing their first compiler plugin.

plugins-interactions-testing

plugins/plugins-interactions-testing/ exercises combinations of plugins (e.g., serialization + parcelize on the same class) to catch regressions where two plugins step on each other's toes.

test-plugins

plugins/test-plugins/ is a collection of micro-plugins used purely as test fixtures by the compiler test suite. Not user-facing.

Where to start

For the simplest plugin code: plugins/plugin-sandbox/. For a real-world IR transformation: plugins/parcelize/. For a real-world FIR extension: plugins/allopen/allopen.k2/. For a runtime-cooperating plugin: plugins/kotlinx-serialization/.

See plugins/index.md for the broader plugin landscape.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Other plugins – Kotlin wiki | Factory