Kent West - kent.west@{that mail that swore to do no evil}
I've been wanting to get my feet wet with GUI programming using Rust, and I finally found a simple enough tool to do so; it's found at Rust GUI Programming.
I'm doing this on a Debian 12 GNU/Linux Box, with Cinnamon as my Desktop. Whereas the Beginner's First GUI Using Rust, on Debian, Using Dioxus Labs Tooling uses a third-party crate from Dioxus Labs, this version using a more standard GTK approach. You may be somewhat aware that much of the GUI work in Linux is based on either the GTK framework or the Qt framework; this is GTK-based.
Install Rust
Install Rust, and make sure you can compile and run a simple "Hello, World" program.
Then create a new project:
(The --bin is optional; it's assumed if not given.)
Add the GTK Dependency to Crate.toml
Create the Program
Then edit the src/main.rs file to the following:
Run the Program
And run the program to display a blank window. Simple.
The Result
You'll find that when you close the window, it does not stop the program. For now, just press Ctrl-C to stop the program.
Add a Button
Again, closing the window does not stop the program, and clicking on this button does not do anything, but you've now started creating a GUI app with GTK from Rust on Debian.