Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps.

License

NotificationsYou must be signed in to change notification settings

slint-ui/slint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlintSlint

Build StatusREUSE statusDiscussions

Slint is an open-source declarative GUI toolkit for building native user interfaces for embedded systems, desktops, and mobile platforms.

Write your UI once in.slint, a simple markup language. Connect it to business logic written in Rust, C++, JavaScript, or Python.

Why Slint?

The nameSlint is derived from our design goals:

  • Scalable: Slint should support responsive UI design, allow cross-platformusage across operating systems and processor architectures and supportmultiple programming languages.
  • Lightweight: Slint should require minimal resources, in terms of memoryand processing power, and yet deliver a smooth, smartphone-like userexperience on any device.
  • Intuitive: Designers and developers should feel productive while enjoyingthe GUI design and development process. The design creation tools should beintuitive to use for the designers. Similarly for the developers, the APIsshould be consistent and easy to use, no matter which programming languagethey choose.
  • Native: GUI built with Slint should match the end users' expectations of anative application irrespective of the platform - desktop, mobile, web orembedded system. The UI design should be compiled to machine code and provideflexibility that only a native application can offer: Access full operatingsystem APIs, utilize all CPU and GPU cores, connect to any peripheral.

Beyond the design goals, here’s what makes Slint stand out:

  • Independent UI Design: Use a declarative language similar to separate your UI from business logic. Designers can work in parallel with developers.
  • Tooling: Iterate quickly with our Live Preview & editor integrations. Integrate from Figma with theSlint To Figma plugin.
  • Stable APIs: Slint follows a stable 1.x API. We evolve carefully without breaking your code.

See what others have built:#MadeWithSlint

Examples

Embedded

RaspberryPiSTM32RP2040
Video of Slint on Raspberry PiVideo of Slint on STM32Video of Slint on RP2040

Desktop

WindowsmacOSLinux
Screenshot of the Gallery on WindowsScreenshot of the Gallery on macOSScreenshot of the Gallery on Linux

Web using WebAssembly

Printer DemoSlide PuzzleEnergy MonitorWidget GalleryWeather demo
Screenshot of the Printer DemoScreenshot of the Slide PuzzleScreenshot of the Energy Monitor DemoScreenshot of the Gallery DemoScreenshot of the weather Demo

More examples and demos in theexamples folder

Get Started

Hello World

The UI is defined in a Domain Specific Language that is declarative, easy to use,intuitive, and provides a powerful way to describe graphical elements, theirplacement, their hierarchy, property bindings, and the flow of data through thedifferent states.

Here's the obligatory "Hello World":

exportcomponentHelloWorldinheritsWindow {width:400px;height:400px;Text {y:parent.width /2;x:parent.x +200px;text:"Hello, world";color: blue;    }}

Documentation

For more details, check out theSlint Language Documentation.

Theexamples folder contains examples and demos, showing how touse the Slint markup language and how to interact with a Slint user interfacefrom supported programming languages.

Thedocs folder contains a lot more information, includingbuild instructions, andinternal developer docs.

Refer to the README of each language directory in theapi folder:

Architecture

An application is composed of the business logic written in Rust, C++, orJavaScript and the.slint user interface design markup, which is compiled tonative code.

Architecture Overview

Compiler

The.slint files are compiled ahead of time. The expressions in the.slintare pure functions that the compiler can optimize. For example, the compilercould choose to "inline" properties and remove those that are constant orunchanged.

The compiler uses the typical compiler phases of lexing, parsing, optimization,and finally code generation. It provides different back-ends for code generationin the target language. The C++ code generator produces a C++ header file, theRust generator produces Rust code, and so on. An interpreter for dynamiclanguages is also included.

Runtime

The runtime library consists of an engine that supports properties declared inthe.slint language. Components with their elements, items, and properties arelaid out in a single memory region, to reduce memory allocations.

Rendering backends and styles are configurable at compile time:

  • Thefemtovg renderer uses OpenGL ES 2.0 for rendering.
  • Theskia renderer usesSkia for rendering.
  • Thesoftware renderer uses the CPU with no additional dependencies.

NOTE: When Qt is installed on the system, theqt style becomes available,using Qt's QStyle to achieve native looking widgets.

Tooling

We have a few tools to help with the development of .slint files:

  • ALSP Server that adds features like auto-complete and livepreview of the .slint files to many editors.
  • It is bundled in aVisual Studio Code Extensionavailable from the market place.
  • Aslint-viewer tool which displays the .slint files. The--auto-reload argument makes it easy to preview your UI while you areworking on it (when using the LSP preview is not possible).
  • SlintPad, an online editor to try out .slint syntaxwithout installing anything (sources).
  • AFigma to Slint plugin.

Please check ourEditors README for tips on how toconfigure your favorite editor to work well with Slint.

License

You can use Slint underany of the following licenses, at your choice:

  1. Build proprietary desktop, mobile, or web applications for free with theRoyalty-free License,
  2. Build open source embedded, desktop, mobile, or web applications for free with theGNU GPLv3,
  3. Build proprietary embedded, desktop, mobile, or web applications with thePaid license.

See theSlint licensing options on the website and theLicensing FAQ.

Contributions

We welcome your contributions: in the form of code, bug reports or feedback.For contribution guidelines seeCONTRIBUTING.md.

Frequently Asked Questions

Please see our separateFAQ.

About us (SixtyFPS GmbH)

We are passionate about software - API design, cross-platform softwaredevelopment and user interface components. Our aim is to make developing userinterfaces fun for everyone: from Python, JavaScript, C++, or Rust developers all theway to UI/UX designers. We believe that software grows organically and keepingit open source is the best way to sustain that growth. Our team members arelocated remotely in Germany, Finland, and US.

Stay up to date

Contact us

Feel free to joinGithub discussionsfor general chat or questions. UseGithub issuesto report public suggestions or bugs.

We chat inour Mattermost instance where you arewelcome to listen in or ask your questions.

You can of course also contact us privately via email toinfo@slint.dev.


[8]ページ先頭

©2009-2025 Movatter.jp