What is it about Rust that makes porting QT different from any other language?
C++ is notoriously hard to bind. The only high-quality Qt bindings I know of are Python ones (Pyside).
A Simple Rust GUI with QML
11–20 of 55 posts
Re: A Simple Rust GUI with QML
#12Part of me wonders how much better web programming could have been a decade ago if QT was the standard that browsers implemented, and we just shipped around QT frontends that ran sandboxed in the browser.
At least the frontend stack with the largest deployment—HTML, CSS, and JS—has a garbage collector and is memory safe. With C#/VB.NET on Windows, Swift on Mac/iOS, and Java on Android ascendant, this is now obviously the way to go. Imagine if we had permanently made the mistake of saddling the Web with manual, error-prone memory management.
Re: A Simple Rust GUI with QML
#13Because it has largely not been done before, part of me wonders how well Rust would work to build a large, complex GUI. All GUI code I've seen relies on inheritance and dynamic dispatch to structure APIs. I would love to see something like the Flutter Engine[1] written in Rust, which is a layer tree that runs in an OpenGL context and includes text rendering, shape drawing, gesture recognition, scroll layers, a layout…
WebRender and Servo together contain all of these.
Re: A Simple Rust GUI with QML
#14What is it about Rust that makes porting QT different from any other language?
C++ is notoriously hard to bind. The only high-quality Qt bindings I know of are Python ones (Pyside).
Re: A Simple Rust GUI with QML
#15Earlier quoted context omitted.
C++ is notoriously hard to bind. The only high-quality Qt bindings I know of are Python ones (Pyside).
What about PyQt5? Or does it work differently?
Re: A Simple Rust GUI with QML
#16Because it has largely not been done before, part of me wonders how well Rust would work to build a large, complex GUI. All GUI code I've seen relies on inheritance and dynamic dispatch to structure APIs. I would love to see something like the Flutter Engine[1] written in Rust, which is a layer tree that runs in an OpenGL context and includes text rendering, shape drawing, gesture recognition, scroll layers, a layout…
> I would love to see something like the Flutter Engine[1] written in Rust, which is a layer tree that runs in an OpenGL context and includes text rendering, shape drawing, gesture recognition, scroll layers, a layout engine, etc. – all components necessary for modern mobile app development. WebRender and Servo together contain all of these.
Re: A Simple Rust GUI with QML
#17Part of me wonders how much better web programming could have been a decade ago if QT was the standard that browsers implemented, and we just shipped around QT frontends that ran sandboxed in the browser.
And instead of JS, we'd be stuck with C++. Not an improvement. At least the frontend stack with the largest deployment—HTML, CSS, and JS—has a garbage collector and is memory safe. With C#/VB.NET on Windows, Swift on Mac/iOS, and Java on Android ascendant, this is now obviously the way to go. Imagine if we had permanently made the mistake of saddling the Web with manual, error-prone memory management.
Sounds like WebAssembly :)
Re: A Simple Rust GUI with QML
#18Part of me wonders how much better web programming could have been a decade ago if QT was the standard that browsers implemented, and we just shipped around QT frontends that ran sandboxed in the browser.
And instead of JS, we'd be stuck with C++. Not an improvement. At least the frontend stack with the largest deployment—HTML, CSS, and JS—has a garbage collector and is memory safe. With C#/VB.NET on Windows, Swift on Mac/iOS, and Java on Android ascendant, this is now obviously the way to go. Imagine if we had permanently made the mistake of saddling the Web with manual, error-prone memory management.
I see the main proposition of QT/QML in providing a framework that is not tied to a particular platform. The main thing that comes close are browser engines, but many people will find their huge footprints too large for using them for embedded applications (or partly even standalone desktop apps).
Re: A Simple Rust GUI with QML
#19Because it has largely not been done before, part of me wonders how well Rust would work to build a large, complex GUI. All GUI code I've seen relies on inheritance and dynamic dispatch to structure APIs. I would love to see something like the Flutter Engine[1] written in Rust, which is a layer tree that runs in an OpenGL context and includes text rendering, shape drawing, gesture recognition, scroll layers, a layout…
Re: A Simple Rust GUI with QML
#20Earlier quoted context omitted.
And instead of JS, we'd be stuck with C++. Not an improvement. At least the frontend stack with the largest deployment—HTML, CSS, and JS—has a garbage collector and is memory safe. With C#/VB.NET on Windows, Swift on Mac/iOS, and Java on Android ascendant, this is now obviously the way to go. Imagine if we had permanently made the mistake of saddling the Web with manual, error-prone memory management.
> Imagine if we had permanently made the mistake of saddling the Web with manual, error-prone memory management. Sounds like WebAssembly :)
(Note that, of course, I'm not opposed to wasm's existence: it's important for many use cases.)