Pauan / rust-dominator

Zero-cost ultra-high-performance declarative DOM library using FRP signals for Rust!
MIT License
999 stars 63 forks source link

Cross-platform Dominator programs #21

Closed kellytk closed 4 years ago

kellytk commented 4 years ago

As cross-platform GUI solutions in Rust are being sought, how could that benefit Dominator in taking it beyond the web with minimal, if any, additional development?

kellytk commented 4 years ago

Related: https://github.com/Pauan/rust-signals, https://github.com/redox-os/orbtk

Pauan commented 4 years ago

I do like the idea of creating some sort of native GUI, but I don't have any experience in that area, and it would require some very significant API changes, since the current APIs are all designed around the web (style, attribute, event, etc. etc.)

So it would probably be easier to just create a new library which is based on the same idea as dominator (and uses futures-signals internally), but has its own separate native API.

kellytk commented 4 years ago

Being based on the same idea as Dominator, and continuing to use futures-signals internally, would the intent be for it to become the successor to the current version of Dominator or to continue in parallel with some overlap?

Pauan commented 4 years ago

It would probably be a new project. Attempting to unify them would be very difficult (or impossible). You would either end up with a lowest common denominator API (which is missing a lot of features), or you end up with completely separate incompatible APIs (which is what React Native does). So there's not really much benefit to trying to unify them. The web is just too different from native GUIs.

The only way I could see to really unify them would be to generate all the UI completely from scratch, using WebGL on the web to render everything (and OpenGL/Vulkan/DirectX to render on native). That would work, but then you would miss out on SEO and accessibility.