by pjmlp · 5y ago · 0 comments
A sucessful Rust GUI also needs the likes Telerik, Component ONE and similar third party vendors with GUI component libraries.
I still can't think of a way to make borrow checker deal with a GUI designer and drag and drop of components(which should be able to be plugged anywhere on the visual tree), or even something like SwiftUI, without forcing Rc<RefCell<>> everywhere.
I am looking forward how Rust/WinRT will look like with WinUI, but again, COM means AddRef/Release everywhere.
one thing im having a hard time wrapping my mind around is, if swiftui depends on (please correct me if im wrong) the swift compiler itself and emited static type information from that compiler, how can rust build an interface to that easily?
it seems like you'd have to make some kind of wrapper lib that emits extern c interfaces that take and return `AnyView` and thereby hurting performance...?
https://github.com/microsoft/winrt-rs
But that is the easy part, the hard part is having the ability to plug a widget anywhere on the tree without triggering a bunch of lifetime errors. WinRT gets around this because it is built on COM, so you get reference counting no matter what.