https://github.com/slint-ui/slint Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} slint-ui / slint Public * Notifications * Fork 119 * Star 4k 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. slint-ui.com View license 4k stars 119 forks Star Notifications * Code * Issues 184 * Pull requests 14 * Discussions * Actions * Projects 1 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 31 branches 16 tags Code Latest commit @tronical tronical Fix cargo fmt ... b4f7d13 Mar 25, 2022 Fix cargo fmt b4f7d13 Git stats * 6,159 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .cargo Update copyright information to reflect name change Feb 9, 2022 .github/workflows CI: add some more project for crater run Mar 18, 2022 .reuse Create editor folder (#999) Mar 2, 2022 .vscode Move resources to the website repo Nov 25, 2020 LICENSES Fix linking to the FAQ in the commercial LicenseRef Feb 10, 2022 api Compiler: make the image processing an enum in the config Mar 24, 2022 cmake Update copyright information to reflect name change Feb 9, 2022 docker Prospective fix for failing embedded build on Linux Mar 22, 2022 docs Apply suggestions from code review Mar 21, 2022 editor Bump version number to 0.2.2 Mar 10, 2022 examples Fix typos Mar 23, 2022 helper_crates vtable: Quieten possible warning about unused unsafe Mar 22, 2022 internal Fix cargo fmt Mar 25, 2022 logo Add missing icon update Feb 8, 2022 scripts Add a sleep in the publish script to throttle things a bit Mar 10, 2022 tests Update tests/cases/layer.slint Mar 21, 2022 tools Janitor: Clap update + basic functionality addition to all binaries Mar 10, 2022 xtask Janitor: Clap update + basic functionality addition to all binaries Mar 10, 2022 .clang-format Reformat public header with Qt's clang-format May 11, 2020 .gitattributes Add a .gitattributes to rust diff looks better Dec 8, 2020 .gitignore Clean up generated C++ include directory handling Sep 18, 2021 .mailmap Add a .mailmap to unify our email addresses Feb 17, 2022 .pre-commit-config.yaml Add more tests to pre-commit.yaml Mar 16, 2022 CHANGELOG.md Wasm GL backend: use a element so it show the keyboard on m... Mar 22, 2022 CMakeLists.txt Update copyright information to reflect name change Feb 9, 2022 CONTRIBUTING.md A few occurence of sixtyfps less Feb 9, 2022 Cargo.toml Adapt Cargo.toml files to the new folder Mar 17, 2022 Cross.toml Update copyright information to reflect name change Feb 9, 2022 FAQ.md Remove broken link from FAQ.md Feb 11, 2022 LICENSE.md Update copyright information to reflect name change Feb 9, 2022 README.md Apply suggestions from code review Mar 18, 2022 cspell.json Add slint to cspell Feb 2, 2022 rustfmt.toml Initial commit laying out the structure May 4, 2020 View code [ ] Current Status Documentation Demos running in WebAssembly Simulation Desktop Native Widgets The .slint Markup Language Architecture Compiler Runtime Tooling Made with Slint Contributions License Frequently Asked Questions About us Contact us README.md Slint Formerly known as [6874747073] Build Status REUSE status Discussions 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++, and JavaScript. Our design goals are: * Lightweight: Fit into a few hundred kilobytes of RAM and require little processing power. * Straightforward: Programmers and designers should feel productive and be able to enjoy the design and development process. The APIs should be consistent, easy to use, and intuitive, no matter the target language. High-quality documentation should describe the APIs, teach concepts and how to use them. * Native: We support many different target platforms, from embedded devices to desktops including mobile and web. Both the user and the developer should feel at home on each platform. The look and feel and experience should match the users' expectations of a native application. Current Status Slint is in active development. Its state of development depends on the kind of application. * Embedded: Ready! Slint is already happily used by customers on embedded devices (running on an Arm processor with Linux). We are also looking into supporting microcontrollers. * Desktop: In Progress. Slint is usable on Windows, Linux and Mac. We plan on building up the desktop support in subsequent releases to reach the level of integration we're aiming for. * Mobile (Android/iOS): Todo. We haven't started supporting mobile platforms yet, but it is our intention to do so in the future. * Web: Our focus is on Embedded and Desktop applications. We do not intend to compete in the web space as a primary platform. That said, Slint can compile to WebAssembly and the demos are running in a web browser. But the web support is currently limited to demo purposes. Documentation Refer to the README of each language directory in the api sub-folder: * C++ (Documentation | Tutorial | Tutorial Video | Getting Started Template) * Rust Crates.io (Documentation | Tutorial | Tutorial Video | Getting Started Template) * JavaScript/NodeJS npm (Documentation) The examples folder contains examples and demos. The docs folder contains build instructions and internal developer docs. Demos running in WebAssembly Simulation Click on the screenshots to run the WebAssembly simulation Printer Demo Slide Puzzle Todo Widget Gallery Screenshot of the Screenshot of the Screenshot of Screenshot of the Printer Demo Slide Puzzle the Todo Demo Gallery Demo Desktop Native Widgets Windows macOS Linux Screenshot of the Screenshot of the Screenshot of the Gallery on Windows Gallery on macOS Gallery on Linux The .slint Markup Language Slint comes with a markup language that is specifically designed for user interfaces. This language provides a powerful way to describe graphical elements, their placement, and the flow of data through the different states. It is a familiar syntax to describe the hierarchy of elements and property bindings. Here's the obligatory "Hello World": HelloWorld := Window { width: 400px; height: 400px; Text { y: parent.width / 2; x: parent.x + 200px; text: "Hello, world"; color: blue; } } Check out the language reference for more details. Architecture An application is composed of the business logic written in Rust, C++, or JavaScript and the .slint user interface design markup, which is compiled to native code. Architecture Overview Compiler The .slint files are compiled ahead of time. The expressions in the .slint are pure functions that the compiler can optimize. For example, the compiler could choose to "inline" properties and remove those that are constant or unchanged. In the future we hope to improve rendering time on low end devices by pre-processing images and text. The compiler could determine that a Text or an Image element is always on top of another Image in the same location. Consequently both elements could be rendered ahead of time into a single element, thus cutting down on rendering time. The compiler uses the typical compiler phases of lexing, parsing, optimization, and finally code generation. It provides different back-ends for code generation in the target language. The C++ code generator produces a C++ header file, the Rust generator produces Rust code, and so on. An interpreter for dynamic languages is also included. Runtime The runtime library consists of an engine that supports properties declared in the .slint language. Components with their elements, items, and properties are laid out in a single memory region, to reduce memory allocations. Rendering backends and styles are configurable at compile time. Current there are two back-ends: * The gl backend uses OpenGL ES 2.0 for rendering. * The qt backend uses Qt's QStyle to achieve native looking widgets. In the future it could also use QPainter. Tooling We have a few tools to help with the development of .slint files: * A LSP Server that adds things like auto-complete and live preview of the .slint files to many editors * It is bundled in a Visual Studio Code Extension accessible from the market place * A slint-viewer tool which display the .slint files. With the --auto-reload argument, makes it easy to preview your UI as you are working it (when using the LSP preview is not possible) * An online editor to try out .slint syntax without installing anything (sources) * An updater to convert the .slint files from previous version to the newer version * An experimental Figma importer Please check our Editor README for tips on how to configure your favorite editor to work well with Slint. Made with Slint List of some open source projects using Slint: (Contact us or open a pull request to add yours) * Cargo UI: A graphical frontend for Cargo. * ImageSieve : GUI based tool to sort and categorize images. * Moire : Musical live performance application with a DAW-like timeline interface. * Chiptrack: A cross-platform sequencer that internally uses a Game Boy emulator to synthesize the sound. * Project Trains Launcher: Cross-platform game launcher made for Project Trains simulator. * Mastermind: Mastermind game coded in Rust. Contributions We welcome your contributions: in the form of code, bug reports or feedback. * If you see an RFC tag on an issue, feel free to chime in. * For contribution guidelines see CONTRIBUTING.md. The dual-licensing requires the contributor to accept a CLA. License This software is provided under a dual licensing scheme: * GNU GPLv3: Open source license ideal for free software. * Commercial Slint license: https://slint-ui.com/#offering See also the Licensing FAQ Frequently Asked Questions Please see our separate FAQ. About us Olivier and Simon started their open source journey in the KDE project, the popular Open Source Desktop Environment for Linux. Later they met while working together in a small company in Norway called Trolltech, on the Qt C++ toolkit. Here, they gained valuable experience in API design, cross-platform software development and user interface components. Simon continued in the Qt Company as one lead developer and maintainer of the QtQml engine, while Olivier co-founded Woboq, a software consulting company. Years later, and now based in Berlin, they are starting a new project. With Slint they aim to make developing user interfaces fun for everyone: from JavaScript, C++, or Rust developers all the way to UI/UX designers. Contact us Feel free to join Github discussions for general chat or questions. Use Github issues to report public suggestions or bugs. To contact us privately send an email to info@slint-ui.com For chat, we also have our Mattermost instance About 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. slint-ui.com Topics language rust gui cpp wasm embedded-devices desktop-applications Resources Readme License View license Stars 4k stars Watchers 40 watching Forks 119 forks Releases 9 0.2.1 Latest Mar 10, 2022 + 8 releases Used by 3 * @slint-ui @slint-ui / slint * @asolidtime @asolidtime / totem Contributors 32 * @tronical * @ogoffart * @hunger * @lukas-jung * @jamesblacklock * @jturcotte * @Be-ing * @jrmoulton * @ryban * @patrickelectric * @Zajozor + 21 contributors Languages * Rust 92.4% * C++ 5.5% * TypeScript 1.0% * CMake 0.6% * Shell 0.2% * Python 0.1% * Other 0.2% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.