A Proposal for an asynchronous Rust GUI framework

It’s an exciting time for GUI development in Rust, as the ecosystem now offers several well-written windowing libraries. The leading library is winit, which has excellent platform support and recently merged keyboard support. Other contenders in the space include egui, a good immediate mode GUI library, and iced, a popular retained mode library used by the Redox OS project. The low-level tooling for GUI development in Rust has also improved, with libraries like cosmic-text and softbuffer making it easier to handle text rendering and window drawing. With these advancements, it’s time to explore different models for Rust GUI frameworks. One model that has gained hype is the Xilem model, but the author believes it falls short. In the author’s opinion, the future of async in Rust and GUI development in Rust are heavily intertwined. Async Rust provides a compelling way to handle events and components within a GUI framework. This article presents an example using the iced code to illustrate how the Future pattern can be applied to GUI development in Rust. While this approach may seem awkward or too similar to React or immediate mode GUI, it showcases the power of using async/await syntax to simplify the code. The disadvantages of this model include the increased complexity of handling events,

https://notgull.github.io/async-gui/

To top