Hi, We support QML_SINGLETON, QML_UNCREATABLE and most other macros as well. If there's a particular one you're missing, feel free to reach out by creating an issue on our repository. Regarding the amount of code needed: We're hoping that in the end it's not much more than it would be in C++. In C++, you also need a header file + a source file, with CXX-Qt, you need the bridge + source, so you can think of the bridge as the header file. There's still a bit of verbosity in Rust, but we're working to improve this where possible. For example: A qproperty in CXX-Qt is already a lot less verbose than in C++, as you don't need to implement the getter and setter manually. Let us know what parts you find particularly annoying to write so we can identify areas to focus on.
@@KDABtv Thanks! Good to hear. I am also interested in whether you have benchmarked performance difference in property binding speeds? A common usage I have is a bunch of qproperties which update at very high frequencies and QML binds to these declaratively. I wonder if there are performance caveats I need to be aware of. My current applications are QtQuick3D.Xr where performance constraints are very strict
@@Felix3301 We have not benchmarked performance ourselves yet, however the implementation of properties is similar to C++ and is using CXX underneath. CXX themselves claim "The resulting FFI bridge operates at zero or negligible overhead, i.e. no copying, no serialization, no memory allocation, no runtime checks needed", so we expect that there would be similar performance with a Rust property vs a C++ property. Please open an issue if you find a place where things are not performant and we can try profiling for issues.
Qt + Rust = Power
Do all the macros like QML_SINGLETON and QML_UNCREATABLE work?
I like it, but the amount of code seems to increase when compared to C++/QML
Hi,
We support QML_SINGLETON, QML_UNCREATABLE and most other macros as well.
If there's a particular one you're missing, feel free to reach out by creating an issue on our repository.
Regarding the amount of code needed: We're hoping that in the end it's not much more than it would be in C++.
In C++, you also need a header file + a source file, with CXX-Qt, you need the bridge + source, so you can think of the bridge as the header file.
There's still a bit of verbosity in Rust, but we're working to improve this where possible.
For example: A qproperty in CXX-Qt is already a lot less verbose than in C++, as you don't need to implement the getter and setter manually.
Let us know what parts you find particularly annoying to write so we can identify areas to focus on.
@@KDABtv Thanks! Good to hear. I am also interested in whether you have benchmarked performance difference in property binding speeds? A common usage I have is a bunch of qproperties which update at very high frequencies and QML binds to these declaratively. I wonder if there are performance caveats I need to be aware of. My current applications are QtQuick3D.Xr where performance constraints are very strict
@@Felix3301 We have not benchmarked performance ourselves yet, however the implementation of properties is similar to C++ and is using CXX underneath. CXX themselves claim "The resulting FFI bridge operates at zero or negligible overhead, i.e. no copying, no serialization, no memory allocation, no runtime checks needed", so we expect that there would be similar performance with a Rust property vs a C++ property. Please open an issue if you find a place where things are not performant and we can try profiling for issues.
Please fix your audio!