If I want to make a cross-platform desktop app, should I go with Rust, Crystal, or Kotlin? The latter being a programming language I already know (but am not sure if it’s the best choice since it relies on the JVM which the user would then have to install), and the former two being ones I’m interested in learning and ones that compile to native executables which I prefer. Which is more suitable for making apps that work both as GUIs and on the command line? Which is more performant?

Ephera
link
4
edit-2
1Y

Well, you’ll need a GUI framework.

With Rust, probably your only option is to bind to Qt, which is a mature, feature-rich framework, but those bindings are still in early stages.

With Kotlin, you’ll have to use a Java GUI framework, which are serviceable, but not exactly known to be amazing.

I don’t know much about Crystal, but I could imagine that you’ll have a hard time finding a GUI framework for it, since it’s a rather new, niche language. Maybe you can also bind to a GUI framework in another language like Qt.

As for CLI frameworks, Rust’s structopt is amazing.
For JVM languages, picocli doesn’t look too bad.

In terms of performance, well, Rust is built for it and its whole community pumps out libraries that strive for optimal performance. Few languages can compete with that.
Kotlin also has the JVM as overhead. For larger applications, it doesn’t matter much anymore, but IMHO you can still notice a certain lag in many JVM-based GUI applications.

And well, you can bundle your application with the JVM into an executable. Also has the advantage that you know what JVM the user will be running.

@poopsex555
link
1
edit-2
1Y

removed by mod

@shadythgod
link
31Y

Out of these three I’ve only worked with Rust. The GUI side is very lacking in my opinion, but other than that I think it’s a very good candidate for cross-platform app dev.

Speaking of Rust, you might want to check out Tauri if you haven’t yet.

By the way, V and Zig seem to be promising in this space but I don’t have that much personal experience with them. Zig is a bit more mature out of the two, being 5 years old while V is a very new language as it’s just a year old. V does have its own cross-platform GUI library, so that might be an advantage.

@glennsl
link
1
edit-2
8M

deleted by creator

@glennsl
link
0
edit-2
8M

deleted by creator

General Programming Discussion
!programming

    A general programming discussion community.

    Rules:

    1. Be civil.

    Other communities:

    • /c/rust
    • /c/python
    • /c/powershell
    • /c/haskell
    • /c/fpcomplete
    • /c/cpp
    • /c/c_programming
    • /c/julia
    • 0 user online
    • 8 user / day
    • 17 user / week
    • 34 user / month
    • 108 user / 6 month
    • 2.53K subscriber
    • 696 Post
    • 905 Comment
    • Modlog