CXX-Qt: safe Rust bindings for Qt

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • QMetaObject crate for Rust

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

  • There are a bunch of bindings with different language, but even the ones that are officially supported like PySide will still be second class citizen and awkward to use.

    Automated binding generation will never give you idiomatic API in whatever language. And if you want an idiomatic library that wraps Qt, it's going to take a huge amount of work.

    Which is why I think restricting to QML makes sense because that's a much smaller API surface. That was the ambition behind my previous crate that exposes QML to rust: https://github.com/woboq/qmetaobject-rs/

    But now I've moved on to another GUI project: Slint https://github.com/slint-ui/slint

  • cxx-qt

    Safe interop between Rust and Qt

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • accesskit

    UI accessibility infrastructure across platforms and programming languages

  • > from personal experience working on GUIs and toolkits for decades i think are overblown)

    Accessibility and internationalization are really hard though, right?

    I'm finally doing something about the accessibility issue: https://github.com/AccessKit/accesskit Still have a long way to go though.

  • qtpy

    Provides an uniform layer to support PyQt5, PySide2, PyQt6, PySide6 with a single codebase

  • ritual

    Use C++ libraries from Rust

  • It is great to see how many people want to bring Qt support to Rust and are trying to do so, and I hope that these folks succeed, but it’s wearisome to me how they each create a new project instead of working with others who are already in this problem space. Of the half-dozen or so[0] existing attempts so far to create Qt bindings to Rust, none of them have actually succeeded because they’ve either been abandoned midway or limit their support to QML. Ritual[1] is the only crate I’ve seen that attempts to actually expose the whole Qt API, but it’s pretty awful to use, incomplete, and dead.

    Rust doesn’t need more Qt crates. It needs one Qt crate that is complete and works well. (Or, ideally, a native Rust cross-platform GUI crate that works as well as Qt, but that’s an even longer and harder task.)

    [0] https://lib.rs/search?q=qt

    [1] https://github.com/rust-qt/ritual

  • slint

    Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.

  • There are a bunch of bindings with different language, but even the ones that are officially supported like PySide will still be second class citizen and awkward to use.

    Automated binding generation will never give you idiomatic API in whatever language. And if you want an idiomatic library that wraps Qt, it's going to take a huge amount of work.

    Which is why I think restricting to QML makes sense because that's a much smaller API surface. That was the ambition behind my previous crate that exposes QML to rust: https://github.com/woboq/qmetaobject-rs/

    But now I've moved on to another GUI project: Slint https://github.com/slint-ui/slint

  • gyroflow

    Video stabilization using gyroscope data

  • I think you can go quite far with Qt/QML and the qmetaobject crate. For example https://github.com/gyroflow/gyroflow

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts