3 ms·
> For this project I landed on gtk-rs, but it's a nightmare of Rc's, RefCells, and borrow_mut just to get even the simplest UI working. > Without thinking too
by m1el 9y ago
> For this project I landed on gtk-rs, but it's a nightmare of Rc's, RefCells, and borrow_mut just to get even the simplest UI working.
> Without thinking too much about it, I feel like things could be better. If Rust was driving the UI loop, and if the callbacks didn't have 'static lifetimes, then it might be possible shove the UI into an isolated struct and not have to deal with too many ownership and lifetime issues.
I recently tried to implement a simple GUI using pure WinAPI, and I finally understod why Rc<Refcell<>> is necessary for callbacks. So far the experience is very mind-boggling.
We desperately need React-like UI library for Rust.