Mixing C++ and Rust - "Hello World"-UI with Rust Using CXX-Qt

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 6

  • @michah3956
    @michah3956 หลายเดือนก่อน +2

    Qt + Rust = Power

  • @Felix3301
    @Felix3301 หลายเดือนก่อน +1

    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

    • @KDABtv
      @KDABtv  หลายเดือนก่อน +3

      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.

    • @Felix3301
      @Felix3301 หลายเดือนก่อน

      @@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

    • @KDABtv
      @KDABtv  13 วันที่ผ่านมา

      @@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.

  • @Luxalpa
    @Luxalpa หลายเดือนก่อน

    Please fix your audio!