Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's the correct way to ship cross platform native software that doesn't require me to write it in C or C++?


Depends on how much compromise you want.

For minimal compromise, you'd write it in Rust/C/C++ with a GUI toolkit that leverages the native stylesheet to render everything out. It'll be fast, it will run cross-platform, and it will take forever to build. However, this is the """right""" way to do it, and the one that people will complain least about. There's a number of tools that are distributed this way, but again, it's a pain.

For medium compromise, you'd probably end up with a runtime like Java or dotnet. These runtimes have well-established, long-running GUI projects that seek to tackle this exact issue, and for most people they balance ease of development, speed and "good enough" UI. It's not perfect, but a lot of one-man dev teams will end up choosing this when they want to get on every platform with a native-enough UI.

For maximum compromise, you can ship Electron with JS bindings to a native UI. This sucks. Please don't do this. It's an option though, and I'd be remiss if I didn't mention it. It's barely better than just putting a website in a desktop runtime, and if you aren't careful you can end up making it a whole lot worse.

It's definitely possible to do, though. If you want to charge money for your application, I should hope you're building a minimal-compromise program.


I don't think there is a single "correct" way. There are several non-C/C++ ways like Java, Electron, BeeWare, etc., but all of them tend to stand out when compared to native apps, regardless of what operating system you're using.


There are Go and Python bindings for Qt. Also Rust has now an early support for it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: