xref: /aosp_15_r20/external/ksp/README.md (revision af87fb4bb8e3042070d2a054e912924f599b22b7)
1*af87fb4bSXin Li# Kotlin Symbol Processing API
2*af87fb4bSXin Li
3*af87fb4bSXin LiWelcome to KSP!
4*af87fb4bSXin Li
5*af87fb4bSXin LiKotlin Symbol Processing (KSP) is an API that you can use to develop
6*af87fb4bSXin Lilightweight compiler plugins. KSP provides a simplified compiler plugin
7*af87fb4bSXin LiAPI that leverages the power of Kotlin while keeping the learning curve at
8*af87fb4bSXin Lia minimum. Compared to KAPT, annotation processors that use KSP can run up to 2x faster.
9*af87fb4bSXin Li
10*af87fb4bSXin LiMost of the documentation of KSP can be found on [kotlinlang.org](https://kotlinlang.org/docs/ksp-overview.html). Here are some handy links:
11*af87fb4bSXin Li
12*af87fb4bSXin Li* [Overview](https://kotlinlang.org/docs/ksp-overview.html)
13*af87fb4bSXin Li* [Quickstart](https://kotlinlang.org/docs/ksp-quickstart.html)
14*af87fb4bSXin Li* [Libraries that support KSP](https://kotlinlang.org/docs/ksp-overview.html#supported-libraries)
15*af87fb4bSXin Li* [Why KSP?](https://kotlinlang.org/docs/ksp-why-ksp.html)
16*af87fb4bSXin Li* [Examples](https://kotlinlang.org/docs/ksp-examples.html)
17*af87fb4bSXin Li* [How KSP models Kotlin code](https://kotlinlang.org/docs/ksp-additional-details.html)
18*af87fb4bSXin Li* [Reference for Java annotation processor authors](https://kotlinlang.org/docs/ksp-reference.html)
19*af87fb4bSXin Li* [Incremental processing notes](https://kotlinlang.org/docs/ksp-incremental.html)
20*af87fb4bSXin Li* [Multiple round processing notes](https://kotlinlang.org/docs/ksp-multi-round.html)
21*af87fb4bSXin Li* [KSP on multiplatform projects](https://kotlinlang.org/docs/ksp-multiplatform.html)
22*af87fb4bSXin Li* [Running KSP from command line](https://kotlinlang.org/docs/ksp-command-line.html)
23*af87fb4bSXin Li* [FAQ](https://kotlinlang.org/docs/ksp-faq.html)
24*af87fb4bSXin Li
25*af87fb4bSXin Li## Feedback and Bug Reporting
26*af87fb4bSXin Li
27*af87fb4bSXin Li[Please let us know what you think about KSP by filing a Github issue](https://github.com/google/ksp/issues)
28*af87fb4bSXin Lior connecting with our team in the `#ksp` channel in the
29*af87fb4bSXin Li[Kotlin Slack workspace](https://kotlinlang.slack.com/)!
30*af87fb4bSXin Li
31*af87fb4bSXin LiIf you are interested in sending PRs, please also check out the [Contributor guide](CONTRIBUTING.md).
32*af87fb4bSXin Li
33*af87fb4bSXin Li## Ongoing and Future Works
34*af87fb4bSXin Li
35*af87fb4bSXin LiHere are some planned features that have not yet been completely implemented:
36*af87fb4bSXin Li* Support [new Kotlin compiler](https://kotlinlang.org/docs/roadmap.html)
37*af87fb4bSXin Li* Improve support to multiplatform. E.g., running KSP on a subset of targets / sharing computations between targets
38*af87fb4bSXin Li* Improve performance. There a bunch of optimizations to be done!
39*af87fb4bSXin Li* Make the IDE aware of the generated code
40*af87fb4bSXin Li* Keep fixing bugs!