What's the Best Language or Framework for Compiling a Cross-Platform GUI Executable?
Asked by
.badminton
I'm looking to create a simple GUI application and I want it to be a standalone executable that can run on multiple platforms without needing to install extra libraries. A couple of years ago, I worked on a GUI app for Windows using C++ and Qt, but I hit a snag with packaging itโspecifically, it wouldn't run on systems without the necessary Qt DLLs. I really don't want to repeat that hassle, and I'd prefer not to dive into Electron since I want to avoid dealing with JavaScript. I'm open to trying a different language; my top picks would be Rust, C++, Python, or Go, especially since I'm not very experienced with Go. I plan to upload the finished product on GitHub for different OS and architectures. Any suggestions?
Answers
Ever considered using Godot? It's primarily a game engine but it's got some neat UI capabilities and is quite portable. Plus, the Godot editor itself was built using it! You could write scripts in a language similar to Python, which might be right up your alley.
Reply to this answer
If you're into C++ and OpenGL, you might want to explore ImGui. It's quite handy for a basic UI setup. Alternatively, Raylib could be a good fit, since it combines a game engine with multimedia functions, making it pretty straightforward to create a window in just a few lines of code.
Reply to this answer
Although you mentioned you want to avoid JavaScript, I have to say Electron is still one of the best options out there due to its wide usage in both small and enterprise applications. However, if you're really not interested, Tauri and Flutter might be alternatives, but they involve JavaScript-based elements. You could also look into that GitHub list of Electron alternatives if you're curious, though I can't vouch for the quality of all of them.
Reply to this answer
You should definitely give Rust a shot! Using `egui`, you can build simple UIs and itโs very cross-platform. Plus, it generates small executable sizes, which is a bonus. It's really quite user-friendly too!
Reply to this answer
Even though you want standalone executables, it's worth noting that nowadays, software often comes packaged differently. In your case with Qt, you could have bundled the necessary DLLs with your app. If you're open to C#, you might find WPF or Avalonia for GUI development handy; they're cross-platform and relatively easy to work with.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions