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
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    4 years ago

    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.