I'd like to migrate a C++-application (with depend...
# kotlin-native
r
I'd like to migrate a C++-application (with dependencies) to a new Kotlin codebase (multiplatform eventually). What is the most practical way to do this? I read some global thinks about C-interop, NDK and Kotlin/native. Should I include/interface the C-lib in a new Kotlin project? Or should I include the Kotlin project into the C-codebase until everything is rewritten and testen in Kotlin? Any best practices?
j
Don't miss that there is no C++ interop, only bare C and Objective-C. The strategy depends a bit on context of the app and how it is developed. Maybe try out a small test case on what works for you and what are the limitations.
o
You could start with implementing some functionality in Kotlin and expose it via reverse C interop (with producing dynamic libraries and C header).
r
I'll try that. Any good directives or links on that? Other than Google ofc