Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 1.63 KB

README.md

File metadata and controls

18 lines (14 loc) · 1.63 KB

kotlin-lambda-return-inliner

Maven Central (Compiler plugin) Maven Central (Gradle Plugin)

Gradle Plugin Portal

A Kotlin compiler plugin that optimises lambdas returned by inlined functions and stored in local variables. This optimisation can be used to emulate structs (and more) in Kotlin code at no cost whatsoever. This repo is currently in a very, very experimental state, and so care should be taken with the usage of this plugin. I'm planning on eventually stabilising this plugin and adding more features, but more on that to come later on. For now, enjoy!

Note: This plugin was created using Brian Norman's Kotlin IR Plugin Template and from guidance from his wonderful article series Writing Your Second Kotlin Compiler Plugin ( seriously like the articles were immensely helpful when I just knew absolutely nothing about IR)