QtQuick/QML bindings for Rust, enabling Rust code to create QtQuick engines and QML to invoke Rust functions.
qmlrs is a Rust library that provides bindings for QtQuick/QML, enabling developers to create graphical user interfaces using Qt's QML language with Rust as the backend. It allows Rust code to create QtQuick engines and load QML scripts, while QML can invoke Rust functions for application logic. This bridges Qt's UI capabilities with Rust's safety and performance.
Rust developers who need to build cross-platform desktop applications with graphical user interfaces, particularly those familiar with or interested in QtQuick/QML for UI design.
Developers choose qmlrs to leverage Rust's memory safety and performance for application logic while using QtQuick's declarative and powerful UI framework, avoiding the need for unsafe code or complex FFI setups. It provides an integrated solution where Qt's event loop and threading are handled automatically.
QtQuick interface for Rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Designed to be safe without requiring `unsafe` code, as mentioned in the README, allowing developers to leverage Rust's memory safety for application logic while interfacing with Qt.
The C++ component needed for Qt integration is compiled automatically via Cargo and CMake, simplifying the build process compared to manual FFI setups.
Enables QML code to directly invoke Rust functions using macros like Q_OBJECT, facilitating smooth interaction between the declarative UI and Rust backend logic.
Automatically initializes the Qt main event loop when creating an Engine, handling thread requirements and reducing boilerplate code, as noted in the README's threading section.
The README explicitly states that while designed to be safe, no promises are made, and code reviews are welcome, indicating it's not yet production-proven and may have undiscovered issues.
Requires Qt5 with specific modules (Core, Gui, Qml, Quick, Quick Controls), CMake, and a C++ compiler, which can be challenging to install and configure, especially on non-Linux systems.
The Qt event loop must run on the main thread on some operating systems, as warned in the README, restricting architectural flexibility and potentially causing crashes if misused.
Fullstack app framework for web, desktop, and mobile.