~/talk

Meta-programming with KSP and Kotlin compiler plugins

slides:none on file

KSP replaces KAPT and runs about 2× faster, provides a stable processor API, supports Java sources, and only generates new files — it has no expression-level introspection and cannot modify existing declarations. Kotlin compiler plugins can change IR and synthesize private members via synthetic resolve extension + IR generation extension, enabling Compose, kotlinx.serialization, Zipline, and Touchlab’s Swift‑friendly API, but require complex Gradle/IDE wiring, unstable Kotlin APIs, painful maintenance, and slower compile/test iterations. Use KSP unless you truly need expression‑level or in‑place code modification.

AI-written summary · about

  1. 0:00Introduction and overview
  2. 2:39What is metaprogramming
  3. 5:32History of JVM metaprogramming
  4. 6:59KSP overview and benefits
  5. 8:47KSP limitations
  6. 10:16Compiler plugins introduction
  7. 12:23Compiler plugin structure and complexity
  8. 14:52Synthetic resolve extension
  9. 16:39IR generation extension
  10. 18:06Setting up plugin development
  11. 21:14Hard learned lessons
  12. 25:13Learning from existing plugins
  13. 26:16Choosing between KSP and plugins
  14. 28:03Testing compiler plugins
  15. 29:08KMP and compiler plugins need
  16. 31:13Recap and recommendations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.