I need to pass the data model to C++ from Kotlin...
# kotlin-native
I need to pass the data model to C++ from Kotlin Native. My current solution is serialization and deserialization through protocol, but as the level of model data increases, it takes more time to transfer the proto method. So I want to find a better solution to replace it. There are some questions about it. 1.Any better suggestions? 2.Now my idea is to create a data model directly in C++. But Kotlin/Native doesn't support C++Interop; Is there any way for Kotlin/Native to get/set the C++ model?
The best option is to provide C APIs (with the C++ layer exporting them via extern c - https://stackoverflow.com/questions/1041866/what-is-the-effect-of-extern-c-in-c ) that Kotlin Native can access via C interop.