Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsJul 12, 2026·3 min de lectura

Slint — Declarative Native GUI Toolkit for Rust, C++, and JS

Slint is a declarative GUI toolkit for building native user interfaces across desktop and embedded platforms. It uses its own markup language (.slint) and supports Rust, C++, JavaScript, and Python backends.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Slint Overview
Comando de instalación directa
npx -y tokrepo@latest install 53a93a0f-7e30-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

Slint provides a dedicated markup language for describing UI layouts, styling, and animations. The toolkit compiles .slint files into optimized native code at build time, producing lightweight binaries suitable for both desktop applications and resource-constrained embedded devices with as little as 300 KB of RAM.

What Slint Does

  • Compiles a declarative .slint markup language into native platform code
  • Renders UIs via multiple backends: OpenGL, Skia, Qt, or a minimal software renderer
  • Supports Rust, C++, JavaScript (Node.js), and Python language bindings
  • Provides a live preview tool and VS Code extension with auto-completion
  • Targets desktop (Windows, macOS, Linux) and embedded (MCU, Raspberry Pi) platforms

Architecture Overview

The .slint compiler parses markup files into an intermediate representation, then generates language-specific bindings. At runtime, a scene graph manages widget layout, property bindings, and animations. The renderer is pluggable: Skia or FemtoVG for GPU-accelerated desktop, or a line-by-line software renderer for microcontrollers. Property bindings are lazily evaluated and automatically trigger repaints.

Self-Hosting & Configuration

  • Add the slint crate and slint-build build dependency for Rust projects
  • For C++, use CMake with find_package(Slint) after installing via vcpkg or building from source
  • Select a renderer backend at compile time: renderer-skia, renderer-femtovg, or renderer-software
  • Configure themes and styles in the .slint file or programmatically at runtime
  • Deploy on embedded Linux with the linuxkms backend for direct framebuffer rendering

Key Features

  • Declarative property bindings update the UI reactively without manual state synchronization
  • Built-in animation system supports easing curves, transitions, and state-based animations
  • Scalable to microcontrollers with the software renderer using under 300 KB RAM
  • Live preview reloads UI changes instantly without recompiling business logic
  • Accessibility built in with focus handling and screen reader support

Comparison with Similar Tools

  • Iced — Iced is pure Rust with The Elm Architecture; Slint uses a separate markup language for UI
  • Qt/QML — Slint draws inspiration from QML but is lighter, open-source-first, and Rust-native
  • Flutter — Flutter targets mobile first; Slint targets desktop and embedded with native performance
  • egui — egui is immediate-mode and redraws every frame; Slint is retained-mode with reactive bindings
  • Dear ImGui — ImGui is designed for debug/tool UIs; Slint targets polished end-user applications

FAQ

Q: Is Slint free for open-source projects? A: Yes. Slint is available under GPLv3 for open-source use and offers commercial licenses for proprietary applications.

Q: Can Slint run on microcontrollers? A: Yes. The software renderer works on MCUs with a framebuffer and as little as 300 KB RAM and no OS requirement.

Q: How do I style Slint applications? A: Styles are defined inline in .slint files or via global style objects. Slint ships Material and Fluent design system styles.

Q: Does Slint support custom widgets? A: Yes. Build custom components in .slint markup and expose them as reusable elements with typed properties and callbacks.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados