slint-ui/slint
Developer ToolsDeclarative GUI toolkit for building native UIs in Rust, C++, JavaScript, or Python across desktop, mobile, web, and embedded.
What it does
Slint is a declarative GUI toolkit for writing native user interfaces in .slint markup and connecting them to business logic in Rust, C++, JavaScript, or Python (3). It targets desktop, Android, iOS, WebAssembly, embedded Linux, and microcontrollers such as STM32, ESP32, and RP2040 (3).
The .slint files are compiled ahead of time into the target language, so property expressions can be optimized and constant properties removed (3). The runtime lays components out in a single memory region to reduce allocations, and rendering can use the OpenAI ES 2.0-based femtovg backend, Skia, or a CPU-only software renderer (3).
Quick start
- Install the language package for your stack:
slintfrom crates.io for Rust,slint-uifrom npm for Node.js, orslintfrom PyPI for Python. The JavaScript and Python bindings are marked Beta (3). - Define a UI in a
.slintfile. The README's Hello World example creates a 400×400 window with a blue text label:
export component HelloWorld inherits Window {
width: 400px;
height: 400px;
Text {
y: parent.width / 2;
x: parent.x + 200px;
text: "Hello, world";
color: blue;
}
}
- Connect that component to your Rust, C++, JavaScript, or Python application using the corresponding API directory and getting-started template (3). The examples folder contains runnable demos, and SlintPad lets you try the markup in a browser without installing anything.
The project provides language-specific documentation and starter templates for C++, Rust, Node.js, and Python.
Tooling
The LSP server adds completion and live preview to supported editors and is bundled in the VS Code extension (3). A separate slint-viewer tool can display .slint files, with --auto-reload for previewing while editing (3). A Figma to Slint plugin imports designs into the markup (3).
Licensing and constraints
The repository offers three licensing paths: a Royalty-free License for proprietary desktop, mobile, and web apps; GPLv3 for open-source apps on any platform; and a Commercial license for proprietary embedded, desktop, mobile, or web apps (3). Which path applies depends on whether the app is proprietary and whether it targets embedded devices, so check the licensing FAQ before choosing (50).
Slint follows a stable 1.x API, meaning updates are intended to avoid breaking existing code (3). A 2024 HN comment reported limitations with recursive types and combining if with for in the DSL, plus stability issues in the VS Code extension at that time (3). These are user reports from an earlier version, not current documented limits.
HotRepo's take
The repository recorded 26 new stars in the Rust daily snapshot on 2026-11-06, placing 11th on that language list; no all-language daily rank is recorded. HN discussion around the 2024-02-02 thread was substantial at 139 points and 40 comments, with users comparing the declarative DSL to QML and debating toolkit ergonomics and licensing (3). A reply attributed to the Slint author argued that bindings in Qt are second-class compared with Slint's smaller, language-agnostic API (3). The attention centers on the declarative model and cross-language reach rather than on measured performance.
Written by AI from the project's README, updated . The project's own docs are the source of truth.