I’m most used to Kotlin for desktop app GUI development, but I want to try using Rust for the computational aspects. Is there an esay way to interop the two, or am I better off just writing the entire app in Kotlin?
I’m most used to Kotlin for desktop app GUI development, but I want to try using Rust for the computational aspects. Is there an esay way to interop the two, or am I better off just writing the entire app in Kotlin?
Native code can interface with the JVM through JNI. You’d write your library as usual, but also JNI interfacing code (possibly still in Rust using the
jni
crate), and a Kotlin wrapper over the JNI interface functions.If you’re used to C FFI and are familiar with the JVM it should be alright. The main issues I had were with Gradle not playing very well with dynamic libraries or Rust.