Hacker News new | ask | show | jobs
by dlivingston 222 days ago
IMO, traditional GUI frameworks in Rust (like Qt) are difficult for the same reason that game engines in Rust are difficult: cyclical references. A window might contain a group box which contains a text field and a button. All of these are (direct or indirect) children of the window, but all children also hold a reference to their parent. Qt's signal-slot mechanism would also be difficult to implement in Rust.
1 comments

Why not just use Arc and clone the cyclical references as much as you want `button: RefCell<Option<Arc<Button>>>`?