Description
CXX-Qt is a set of Rust crates for creating bidirectional bindings between Rust and C++ with Qt. You can use it to integrate Rust into a C++ application built with CMake, or to build a Rust application with Cargo. It provides tools for writing QObject subclasses in Rust that can be used from C++, from QML and from JavaScript. The project has two parts. cxx-qt-lib is a library of Rust bindings to common QtCore and QtGui classes, made with CXX. cxx-qt and cxx-qt-build are Rust and C++ code generators that go beyond CXX with attributes for Qt signals, slots and the property system. cxx-qt-build runs in Cargo build scripts to generate and compile the C++ code. The project supports Qt 5.15 LTS and all versions of Qt 6, and it does not support older versions. CI tests run on Linux, Windows, macOS and WebAssembly, and other platforms that Qt and Rust both support should also work. The README says the project is in early development and the API changes often. A comparison table sets it against other Rust Qt bindings. The code is dual licensed under MIT or Apache 2.0.…
Highlights
- Rust QObject subclasses usable from C++, QML and JavaScript
- Works in CMake C++ projects or Cargo Rust projects
- Qt signals, slots and property system support
- Supports Qt 5.15 LTS and Qt 6
- Tested on Linux, Windows, macOS and WebAssembly
Ratings & Reviews
No ratings yet
Be the first to rate CXX QT.
People also visit
CXX QT FAQ
What is CXX-Qt?
A set of Rust crates for bidirectional Rust and C++ bindings with Qt.
Can I use it inside a C++ app?
Yes. The README describes integrating Rust into C++ applications with CMake.
Which Qt versions are supported?
Qt 5.15 LTS and all versions of Qt 6. Older versions are explicitly unsupported.
Is it ready for production?
The README says it is in early development and the API changes frequently.
Which platforms are tested?
Linux, Windows, macOS and WebAssembly on CI.
What license is it under?
MIT or Apache 2.0, according to the SPDX header in the README.
What are the best CXX QT alternatives?
Popular alternatives to CXX QT include C2rust, Qcoro and SingleApplication. See all CXX QT alternatives
