# compose-desktop

Vikas Rathod

12/13/2023, 8:54 PM
How can i use platform specific native api without Java Bridge. Like Windows Registries, MacOS System Configuration Framework. I am writing an application to share files across platform (android, ios, mac, linux and windows) Do not wish to write UI in each platform so using compose. The main app will use compose. I wish to share main app UI, business logic (domain), models, viewModel, API call to server and local database operation. The above domain layer will use the platform specific native api. The Toolbar and widget will be written in platform native.

Kirill Grouchnikov

12/13/2023, 9:01 PM
Compose is on top of Kotlin which is (kinda if you squint the right way) on top of Java. If you want to call native APIs, you use JNI bindings.
👍🏻 1

Vikas Rathod

12/13/2023, 9:08 PM
Can I have UI JVM -> Kotlin Native -> Native Framework

Alexander Maryanovsky

12/13/2023, 9:33 PM
You can through cinterop. Here’s a reddit thread where someone did that:
👍 1

Vikas Rathod

12/13/2023, 10:57 PM
@Alexander Maryanovsky I thing this will not work. cinterop converts static library to be used in kotlin. Use case is to use static library on JVM.