Kotlin-JNI
2.1.0indexedUnifies JNI usage across native targets, offering rich type-conversion helpers, annotation-driven generation of C-style JNI stubs, and seamless Java-to-native calls that remove boilerplate.
Unifies JNI usage across native targets, offering rich type-conversion helpers, annotation-driven generation of C-style JNI stubs, and seamless Java-to-native calls that remove boilerplate.
Surfaced from shared tags and platforms — no rankings paid for.
Kotlin-JNI is a powerful Kotlin Multiplatform library designed to simplify and unify JNI (Java Native Interface) development across Android, Desktop (Linux, macOS, Windows), and Kotlin/Native.
It provides a common JNI interface for all supported native targets and includes a KSP module to automatically generate JNI-compatible function stubs, eliminating boilerplate and bridging the gap between your native Kotlin code and the Java world.
I want to express great gratitude to the original creator @DatL4g for the idea and execution. This project indeed makes JNI on Kotlin painless and effortless.
However, since the original repository no longer has a permissive license, this repository had to be created, based on the older, Apache-licensed version.
androidNative, linux, , and targets.Please read the full documentation.
Feel free to create Pull Requests and Issues. I will do my best to address them.
macosmingwX64jstring.toKString(), IntArray.toJIntArray()).@JNIConnect annotation.