Being new to Rust, I'm starting with various simple examples to understand some of the dynamics.
Upon initial searches, I found the following references:
https://blog.logrocket.com/state-of-rust-gui-libraries (09-Aug-2022)
https://www.libhunt.com/l/rust/topic/gui (as of 02-Jul-2023)
Getting Started
# create the project
cargo new hellorusticed
cd hellorusticed
code .
# add dependencies
cargo add iced
cargo add iced_lazy
cargo add iced_native
Example 1 - Slider
Here is one example that worked right out of the box.
Copy main.rs contents from the following link into the new project (https://github.com/iced-rs/iced/blob/0.9/examples/slider/src/main.rs)
Build via
cargo build
.
Sandbox
implementation makes this happen, but not sure. I modified the application to use a println!
when an update event occurred on an event.The following screenshots were taken from the build output with a slightly hacked update
function for test purposes.
Example 2 - Download Progress
Here is the second, slightly more comprehensive application that downloads a speed test file.
https://github.com/iced-rs/iced/tree/0.9/examples/download_progress
I re-used the last example mostly... actions included the following, although unsure if they were needed.
purge
target
directorydeleted
Cargo.lock
.modified
Cargo.toml
directly to remove unneeded dependencies.
# dependencies
cargo add iced --features tokio
cargo add iced_native
cargo add iced_futures
cargo add reqwest --no-default-features --features rustls-tls
# build
cargo build
Conclusion
It feels like there is some potential here, but not ready for prime time. I struggled to get some of the examples to work, including the seemingly simple modal dialog example. I'll keep my eyes on this one.