Calling Kotlin from C++

At Highrise we’ve been building the future of our platform in a way that supports Android. We’ve put together a stack that is pretty challenging but really fun to build. It’s based on a C++ core and platform specific projects in Swift (for iOS) and Kotlin (for Android) that uses that core. On Swift you need to have an Objective-C++ wrapper for Swift to call functionality in the C++ core, but it’s pretty straightforward and things like wrapping a block in an std::function works pretty well. Android however runs on the JVM and requires using JNI to communicate with C++. This took away the niceness of Kotlin lambdas for asynchronous completion away from us. Or did it?

Continue Reading »