I thought C++ and C# introp was available with KN
# kotlin-native
k
I thought C++ and C# introp was available with KN
a
Only C at the moment, cpp has some fetures which are too complex to map in Kotlin. C#? No plans to that according to my knowledge
g
C# is not native, it's closer to Java and has own virtual machine CLR
t
Like Java, it's possible to compile it to machine code with caveats, do not recommend. But anyway... it's possible to do C and ObjC with minimal effort because they are "C compatible" - the term typically used escapes my mind. Compiled Swift might work with cinterop, but for C++ you'll probably need to make a wrapper, which is fairly simple. You just make functions that take a pointer as the first parameter which would be a pointer to the object, and you could create wrappers in Kotlin that hold a 'val ptr: Long'... tldr, cpp first class interop might not be worth the hassle, but I have a production app that uses C++ with Kotlin and Swift, so anything is possible with a little effort.
m
Well, for small C++ lib effort is little, for huge libs like Qt - it's not possible.