Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. qmetaobject-rs

qmetaobject-rs

MITRustv0.2.7

A framework for creating Qt/QML applications with Rust by building QMetaObjects at compile time.

GitHubGitHub
727 stars92 forks0 contributors

What is qmetaobject-rs?

QMetaObject is a Rust crate that enables developers to create Qt/QML applications using only Rust, without writing any C++ code. It works by generating QMetaObjects—Qt's metadata system for QML—at compile time and providing Rust-friendly wrappers for Qt types. This solves the problem of integrating QML's powerful UI capabilities with Rust's performance and safety features.

Target Audience

Rust developers who want to build cross-platform desktop applications with modern, declarative QML interfaces while keeping their codebase entirely in Rust.

Value Proposition

Developers choose QMetaObject because it eliminates the complexity of mixing C++ and Rust in Qt projects, offering a pure-Rust workflow with direct access to Qt APIs when needed. Its compile-time code generation ensures type safety and performance, making it a robust alternative to manual FFI or other binding generators.

Overview

Integrate Qml and Rust by building the QMetaObject at compile time.

Use Cases

Best For

  • Building desktop applications with QML interfaces and Rust backend logic
  • Integrating existing Qt/QML codebases with new Rust components
  • Creating performant, type-safe GUI applications in Rust without C++
  • Developing cross-platform apps that leverage Qt's rich widget ecosystem
  • Prototyping QML-based UIs quickly with Rust's tooling and safety
  • Extending Qt applications with Rust libraries or algorithms

Not Ideal For

  • Projects requiring QWidget-based interfaces or non-graphical Qt APIs, as QMetaObject is exclusively for QML.
  • Teams needing actively maintained libraries with frequent updates and community support, given its passive maintenance status.
  • Applications aiming for a minimal, Rust-native dependency footprint without C++ runtimes, since it requires Qt installed.
  • Developers who prefer to avoid unsafe code entirely, as extending functionality often involves the unsafe cpp! macro.

Pros & Cons

Pros

Pure Rust Workflow

Enables building Qt/QML applications entirely with Cargo, eliminating the need for C++ code or external build systems like qmake, as emphasized in the README.

Idiomatic QML Integration

Uses derive macros to expose Rust structs as QML types with properties, signals, and slots, making integration seamless and type-safe without manual FFI.

Performance Optimized

Designed to avoid unnecessary conversions and heap allocations, ensuring efficient runtime behavior for GUI applications, as stated in the objectives.

Flexible C++ Interop

Provides the cpp! macro for direct access to unwrapped Qt C++ APIs when wrappers are missing, allowing extended functionality without leaving Rust.

Cons

Passively Maintained

The README explicitly states that the crate is only passively maintained as focus has shifted to Slint, risking long-term support and updates.

Incomplete API Coverage

Many Qt C++ APIs are not wrapped, requiring developers to use the unsafe cpp! macro and handle C++ interop manually, which can be error-prone and complex.

Complex Extension Setup

Adding new wrappers involves setting up build scripts, understanding both Rust and C++, and using unsafe code, as detailed in the tutorial, increasing development overhead.

Qt Dependency

Requires Qt >=5.8 to be installed on the system, adding external dependencies and potential cross-platform complications beyond Rust's ecosystem.

Frequently Asked Questions

Quick Stats

Stars727
Forks92
Contributors0
Open Issues77
Last commit1 month ago
CreatedSince 2018

Tags

#desktop-application#qt#procedural-macros#ui-toolkit#ffi#gui-framework#qml#rust

Built With

Q
Qt
p
procedural-macros
R
Rust

Included in

Rust56.6k
Auto-fetched 1 day ago

Related Projects

TauriTauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.

Stars106,980
Forks3,626
Last commit1 day ago
DioxusDioxus

Fullstack app framework for web, desktop, and mobile.

Stars36,114
Forks1,662
Last commit2 days ago
icediced

A cross-platform GUI library for Rust, inspired by Elm

Stars30,553
Forks1,574
Last commit2 days ago
eguiegui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native

Stars29,169
Forks2,047
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub