slint
QMetaObject crate for Rust
Our great sponsors
slint | QMetaObject crate for Rust | |
---|---|---|
137 | 20 | |
14,640 | 594 | |
15.2% | 2.9% | |
9.9 | 6.5 | |
2 days ago | 29 days ago | |
Rust | Rust | |
GNU General Public License v3.0 Or Slint Royalty-Free | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
slint
-
Deno in 2023
Currently, we do it by using binaries through napi-rs so we can bring in a window using the platform native API. And then we do some hack to merge the event loops.
But if Deno supports bringing up a window directly, this means we can just ship wasm instead of native binary for all platform. And also I hope event loop integration will be simplified.
Although we'd also need more API than just showing a window (mouse and keyboard input, accessibility, popup window, system tray, ...)
-
Slint GUI Toolkit
Rich Text content is not yet implemented. This is tracked in https://github.com/slint-ui/slint/issues/2723
Thanks for reporting the broken link. Fixed in https://github.com/slint-ui/slint/commit/9200480b532f49007d2...
Web is not a primary target of Slint.
> Web: In Progress. Slint apps can be compiled to WebAssembly and can run in a web browser. As there are many other web frameworks, the web platform is not one of our primary target platforms. The web support is currently limited to demo purposes.
-
slint VS rinf - a user suggested alternative
2 projects | 24 Jan 2024
-
A 2024 Plea for Lean Software
With Slint (https://slint.dev) we're trying to make a lightweight toolkit that doesn't use HTML/CSS. And that you can program either from low level languages such as C++ or Rust. As well as with higher level language such as JavaScript, and we want to extend to python too.
-
Immediate Mode GUI Programming
I haven't. I was just searching for a GUI library that was Bevy-compatible and slint isn't at the moment: https://github.com/slint-ui/slint/discussions/940
Sorry!
-
Why the M2 is more advanced that it seemed
Trying to do that with Slint: https://slint.dev
- 9 years of Apple text editor solo dev
-
The Linux graphics stack in a nutshell, part 1
You can do that with Slint (https://slint.dev) and its linuxkms backend. No need for a xorg server or wayland compositor, just run the application made with Slint from the init script.
QMetaObject crate for Rust
-
9 years of Apple text editor solo dev
You can use Rust with QML[1].
QML is actually pretty amazing. I've been building my block editor[2] view entirely in QML while the model is in C++. This separation of logic and presentation works great. And yes, there are some crashes sometimes (that I find quite easy to debug thanks to the built-in debugger), but take for example a similar app that's built with Rust and Dart[3], in my testing there were still memory leaks that caused my computer to hang. It's better to know you have a bug than for it to be hidden from you.
I agree with parent commenter, saying these cross-platform frameworks will end up supporting the least common denominator set of features. But I found with external open source libraries, the community is catching up very fast. For example, you want the awesome translucency macOS apps have for your Qt app? Here you go[4]. Many such cases. It's also pretty straightforward to add your own custom OS-dependent code, especially so, if someone already open sourced his approach. I recently wanted to move the traffic light buttons on macOS for my app, but couldn't figure the Objective-C code for that. I ended up looking at either Tauri or Electron source code and found my answer.
[1] https://github.com/woboq/qmetaobject-rs
-
I like rust but want to use Qt.
I just used qmetaobject-rs and my experience with Qt/QML. There's the QML book from Qt if you're just starting, which is pretty nice https://www.qt.io/product/qt6/qml-book
You can use cxx-qt or qmetaobject-rs. Or use Slint
- GUI development with Rust and GTK 4
-
Made my first app in Rust! A notification daemon for Linux :)
qmetaobject is probably the most mature Qt Rust binding at the moment. It uses the cpp crate to embed C++ inline in Rust to create its bindings. There are some people using it and it does get some maintenance, but it's not under active development since the original author is now working on Slint.
-
Using KConfig with Rust
The bindings currently use the git version of qttypes since I had to merge some upstream changes that are needed for these bindings. So they are not ready for prime time just yet.
-
CXX-Qt: safe Rust bindings for Qt
- It does support plugins: https://github.com/woboq/qmetaobject-rs/tree/master/examples...
I wonder what problems from the list apply to another existing and more mature solution: https://github.com/woboq/qmetaobject-rs/
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
-
Why does Rust code compile into a single executable binary?
Whisperfish does this with Qt: https://github.com/woboq/qmetaobject-rs/issues/102
What are some alternatives?
tauri - Build smaller, faster, and more secure desktop applications with a web frontend.
iced - A cross-platform GUI library for Rust, inspired by Elm
egui - egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
lvgl - Embedded graphics library to create beautiful UIs for any MCU, MPU and display type.
dioxus - Fullstack GUI library for desktop, web, mobile, and more.
cxx-qt - Safe interop between Rust and Qt
webview - Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).
druid - A data-first Rust-native UI design toolkit.
Slint - Slint is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript. [Moved to: https://github.com/slint-ui/slint]
fltk-rs - Rust bindings for the FLTK GUI library.
imgui - Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
wxRust - A Rust binding of the wxWidgets cross platform toolkit.