https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sam

02/19/2021, 6:49 PM
Hello everyone, I have an idea to build Messenger/Chap desktop app like telegram ( I want to use KMM to supported Mac,Windows, Linux, iOS, Android, Web) My goal is using compose-desktop + KMM So I have some questions: 1. is Ktor can handle network for Mac,Windows, Linux, iOS, Android, Web? 2. Which MQTT libs can suitable for Mac,Windows, Linux, iOS, Android, Web? 3. How to include C++ for KMM? example https://github.com/Samsung/rlottie Thanks.
c

Cicero

02/19/2021, 7:20 PM
1 is yes
a

Abhishek Dewan

02/19/2021, 9:09 PM
For #3 to include C++ libraries in your KMM project, it won’t be any different if you were doing it for android or iOS. you would have to build the library using the native platform C++ toolchain and then use them in your platform KMM modules. So for example you will build rlottie for android (arm and x86 and 64bit versions for both) and then use them as external libraries for the android module.
m

msink

02/20/2021, 3:12 AM
And if you want to use compose on Android and compose-desktop on desktop - all C and C++ libraries have to be wrapped in JNI for using from regular Kotlin/JVM, not Kotlin/Native. For now and in near foreseeable future compose-desktop applications will work in JVM. KMM here is applicable only on iOS.
2 Views