This library provides a safe mechanism for bridging between Qt code and Rust code in a different way to typical Rust Qt bindings.
We acknowledge that Qt code and Rust code have different idioms so cannot be directly wrap from one to another.
We feel this is more powerful than typical bindings as this allows us to provide a safe API and safe multi-threading between Qt and Rust.
Through the use of macros and code generation as seen in the figure below, the developer describes a
QObject with CXX-Qt macro annotations. Then CXX-Qt generates the C++ representation of the object and uses macro expansion to define the CXX bridge for the interop between C++ and Rust.
If you are new to CXX-Qt, we recommend you visit our Getting Started Guide.
To get detailed information on which features of a QObject are available in CXX-Qt, see the QObject chapter. Should you be interested in a deeper dive into the concepts of CXX-Qt, take a look at the concepts chapter, which explains the concepts CXX-Qt introduces in detail.
Note: CXX-Qt is tested on CI on Linux, Windows, and macOS (all on x86). It should work on other platforms that Qt and Rust both support, however, these are not tested regularly.