Skip to content

A Kotlin compiler plugin that optimises lambdas returned by inlined functions

License

Notifications You must be signed in to change notification settings

kyay10/kotlin-lambda-return-inliner

Repository files navigation

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)

About

A Kotlin compiler plugin that optimises lambdas returned by inlined functions

Resources

License

Stars

Watchers

Forks

Packages

No packages published