Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

slint-ui/slint

Developer Tools

Declarative GUI toolkit for building native UIs in Rust, C++, JavaScript, or Python across desktop, mobile, web, and embedded.

24,430
1,059
Rust
NOASSERTION
6 years old

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

  1. Install the language package for your stack: slint from crates.io for Rust, slint-ui from npm for Node.js, or slint from PyPI for Python. The JavaScript and Python bindings are marked Beta (3).
  2. Define a UI in a .slint file. 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;
    }
}
  1. 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.

Hacker News

Slint GUI Toolkit
▲ 139 · 40 comments · February 2, 2024
Slint: Native GUI Toolkit for Rust, C++ or JavaScript
▲ 112 · 30 comments · March 26, 2022