GTK4 Text Editor in Rust
I haven't built much in Rust yet so I decided to try my hand at a desktop GUI app using asynchronous IO. After some searching I found GTK4 to be the most viable GUI framework although I am rooting for a more pure Rust framework to catch up and have an editor comparable to Glade. Regardless, I built this application in Gnome Builder using flatpak following the advice of the gtk-rs Book for developing gtk4-rs on Linux.
I made a very simple text editor and it has a few bugs, but it also has a status bar, toast messages (on the status bar), error handling, and it opens and saves files off the main thread. I found an interesting way to structure this as MVC using MPSC channels which helped with code organization and made structuring the asynchronous parts much simpler. It also helped me get past the need for explicit smart pointers passing references everywhere.
There are some odd bugs that I don't yet understand. Sometimes GTK reports null strings. Maybe that's due to how young the GTK library is? Or maybe I've made some mistakes in my code?
Regardless, I appreciate any feedback you all have. I am looking to learn. Just be kind.
Here's my repo: https://github.com/BernardIgiri/TextEdit