Compose for native linux/windows app

Compose unfortunately doesn’t support native desktop targets, only desktop JVM for now.

I would also absolutely love that, but it’s understandably a huge undertaking. JVM works pretty well though, and you can generate an installer with a bundled JVM for your app (Compose comes with the necessary Gradle tasks for that).

Obviously if you want to use the host system’s APIs that aren’t exposed by the JVM, you’ll have to reach out for JNI/JNA, (or build some sort of “host server” in a native language, that the client connects to), which isn’t great. More often than not, you’ll find ready Kotlin/Java libraries abstracting most things you’ll ever need.

1 Like