[0]: HN comment -(https://news.ycombinator.com/item?id=19746440)
> 2.1) I want to ship something that looks the same on Windows / Linux / MacOS
As a user: No no no, please, no.
I want apps to fit the look, feel, and idioms of the OS I'm currently in, not "look the same" on every OS.
For example. macOS in particular has many builtin features that work in all apps with standard controls. Like text-to-speech, or converting selected text into all-caps, lowercase, or capitalized. Or custom services/scripts built in Automator.
I may not always use these little tricks all the time, but when they fail to work in some app, it immediately feels lower quality, suspicious, and/or suggests a lazy developer.
It's not pleasant to use something that ignores the special features of a platform in favor of the lowest common denominator.
When I’m using an advanced UI to do some specialized task, I generally appreciate when the UI patterns I learn on one OS transfer seamlessly to any other device and OS I may use to do the same task.
But I especially appreciate that apps can choose the UI style and design to suit the task at hand, rather than some notion of conforming to OS style patterns that may or may not work in its favor. For example, I prefer that Visual Studio Code looks the same on all platforms, because I find its UI to be superior to the default style of any OS!
What do you think about these thoughts? Am I alone in preferring custom UIs per app, with consistent app experience across devices?
[1] For the sake of this argument, I’m not counting differences in runtime performance and efficiency, since that’s a whole other topic, and one theoretically orthogonal to the UI design.
1. it has to look and behave the same way everywhere (because we don't want to have to retrain users when they switch platform, to maintain several documentation and marketing materials, and because we want to respect the designer's esthetic vision, and / or corporate graphical vision)
2. It has to look and behave native everywhere (because we don't want to confuse users of any given platform.)
Again : of course, I know they're contradictory ! If you have a sword to cut that knot, go for it !
And of course you're perfectly allowed to value requirement 2 more than requirement 1.
And sadly here, different user's interests are not aligned with different software producer's interests, so we're basically not going to please everyone.
Again, I have neither data, nor religion, nor solution about this.
I’m probably very naive here- since I am not a rust or swift developer!!
My current challenge is to swap out different top-level views as I navigate to different parts of the app. This may may be something best suited to something like Cursive.rs, but I'm still holding out hope that the GUI toolkits will mature at a reasonable clip.
It's really quite refreshing to see something more portable and lightweight than Electron gain traction. So far the only major detractor I've seen is that the project uses Zulip for chat/messaging and it's put behind a registration wall.
X11 and wide idea of terminals go in hand. It's a problem of abstraction and platforms evolving. So I think, that you either end up with something like Web front-ends of today or something more structured, but far simpler like various TUIs or maybe Tcl/Tk with it's windowing shell wish. I think that some middle ground is possible, but hard and shifting quite fast.
However, things are different now. We could embed Lua or WASM into the display server, and you'd have a much more programmer-friendly platform that can run efficiently enough to feel snappy. We have more memory, so you don't need to share toolkits between applications.
Maybe it's time to revive the concept.
This used to be a problem in the past but not anymore. I would really like to finally see Rust's answser to having a non-Electron cross-platform GUI library.
I think the author might have to support GTK+ theming options to counter this issue then? If not then perhaps using GTK+ for Linux and using the win32 and cocoa crates separately and abstracting that might be something worth looking at?
...and the author is abandoning it to move on to other things?
/shrug
Didn’t solve any of the actually hard problems of a cross platform or rust based UI imo.
It also breaks the site guidelines, which include: "Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."
https://github.com/andlabs/libui
We're considering using it for the next generation of the ZeroTier desktop UI. Unfortunately no mobile support (but we already have native mobile UIs), but it looks like the best contender for a cross platform UI lib that is light and fluffy and simple. Rust bindings should be trivial. There are high quality Go bindings here:
Can you comment on whether you evaluated Java Swing or Java FX as a cross platform UI lib for your needs? I am curious to hear others thoughts on the matter.
Javafx/tornadofx or maybe wxwidgets/qt is a better choice
Unfortunately, in the GTK+ 3.x era and beyond, the perspective of many KDE users is that hell has frozen over because GTK+ has supplanted MacOS as the GUI with the most alien feel to it.
(Plus, the LXDE developers started a transition to GTK+ 3.x, got fed up, and decided that their upgrade path from GTK+ 2.x would be Qt 5. They then merged with Razor-Qt to form LXQt.)
Personally, what rubs me the wrong way the most is the various ways in which it explicitly goes against what HCI research recommends because the GNOME people just liked it better their way. (And I've read quotes by the devs showing that they now see GTK+ as GNOME's toolkit first and other desktops are on their own if they don't want to ride along... which explains things like how long it took them to stabilize the GTK+ 3.x theming APIs.)
I still might consider it if the gtk3-mushrooms patchset for making GTK+ 3.x less alien weren't a single-person, amateur effort that's only packaged for Archlinux.
Edit: To be clear, I'm not comparing the relative merits of different GUI options, I'm saying that GTK is the only option that you really have in Rust today.
relm might be a much saner approach to avoid trying to understand why some button callback cannot read the text from an input field and such stuff.
I’ve been experimenting with several gui libraries in Rust lately and so far the GTK3 bindings seem to be the most promising for building native GUIs in Rust.
With native I mean GTK/Qt style fast/performant widgets that do not necessarily use platform-specific widgets.
This project seems to use GTK as one of its backends. I’m curious to see how the multiple backends architecture will influence the library design as GTK, html and TUI are vastly different.
As a KDE user, QML is about as useful to me as GTK+ when it comes to feeling native, so bindings built around those APIs are out.
rust-qt-binding-generator (the one maintained by KDE people) is fundamentally designed around the assumption that you're comfortable writing parts of your program in C++. (It's designed for embedding Rust pieces in a project with its own build automation, like CMake, and where hand-written C++ will still be used for part of the process of talking to Qt.)
rust-qt comes the closest to what I want (something where, as long as I don't touch the `unsafe` keyword and I only pick trustworthy dependencies, I can't accidentally introduce memory-unsafety into my project.) but "Creating custom signals from Rust code." is still on the TODO list and its development seems to have run out of steam.
So far, my solution has been to use Rust to write a cleanly encapsulated backend, use rust-cpython to expose it to Python, and then use PyQt5 (because I haven't started a new Qt project since PySide2 matured) to build a frontend, producing a QML-esque development experience for the QWidget APIs... though I'd still much rather have strong compile-time checks for the entire project.
On the GTK-rs side the documentation [1] is much better and I was up and running with a sample project in a few minutes.
[1]: https://gtk-rs.org/
This does not apply if your application has so many custom controls that being native does not matter that much (for example a music creation software or a highly advanced raster editor)
2020 was already slated for Rust for me but this may make me start dabbling in it a few months early (assuming I can find up to date leaning materials)
Tldr great job, please don't give up on the hard part of win32 and macos but this has a great foundation feature set.
See e.g. https://github.com/rust-windowing/winit/issues/159
If you create a rust ui framework that supports the VST windowing/event loop model and just supports one GUI backend on Win32/MacOS, then many people in the audio plugin community would be very happy.