Another massive change just landed on the development branch: “Message-based component framework for Gnome Commander” https://gitlab.gnome.org/GNOME/gnome-commander/-/work_items/311
If you ever worked with Gtk in Rust you probably hated it. The philosophies are radically different, making Gtk code in Rust verbose, difficult to maintain and error-prone (as in: crashes). I looked around and the only real solution is Relm4 which allows writing far more Rust-like Gtk code. We now implement a very similar approach.
But why not Relm4? ⬇️

Message-based component framework for Gnome Commander (#311) · Issues · GNOME / gnome-commander · GitLab
Gnome Commander is currently built directly on Gtk4 Rust APIs. This approach unfortunately comes with significant downsides, for example: Subclassing widgets requires defining two...
GitLabCopying an existent library is far from ideal and this step hasn’t been taken lightly. My trial balloon was the Keyboard Shortcuts dialog which I reimplemented twice: once with Relm4 and another time with our own similar library. One issue that popped up was the `view!` macro of Relm4: it tries to do everything and maximally compact, resulting in a complex syntax very unlike Rust. Our `with!` macro stays very close to Rust syntax on the other hand, making it much easier to read. ⬇️
Our code also takes some shortcuts which probably make it worse from the conceptual point of view but simpler to use. For example, parent components can access the data of subcomponents directly. We don’t quite separate code modifying the state and code modifying the view: with Gtk requiring input focus to be managed manually on far too many occasions such separation is obstructive. View updates are generally more explicit, Relm4 attempting and often failing to hide the complexity here. ⬇️
Last but not least, there are serious concerns about the state of the Relm4 project. It appears to be in maintenance mode, not even keeping up with Gtk changes. While the core code is well though out, other parts of the library are inconsistent to say the least and often fail to follow Relm’s design concepts. So in the end it was also a question of risk: investing lots of effort into porting the code to Relm and then getting stuck when Gtk5 comes out isn’t a great prospect. ⬇️