#ui-toolkit #toolkit #ui #desktop-applications #design #graphics

no-std slint

GUI toolkit to efficiently develop fluid graphical user interfaces for embedded devices and desktop applications

28 releases (15 stable)

1.5.1 Mar 20, 2024
1.4.1 Feb 2, 2024
1.3.2 Dec 1, 2023
1.3.1 Nov 28, 2023
0.2.1 Mar 10, 2022

#1 in #design

Download history 1369/week @ 2023-12-07 1549/week @ 2023-12-14 1237/week @ 2023-12-21 1048/week @ 2023-12-28 1849/week @ 2024-01-04 2452/week @ 2024-01-11 2025/week @ 2024-01-18 1929/week @ 2024-01-25 2170/week @ 2024-02-01 2104/week @ 2024-02-08 3672/week @ 2024-02-15 3322/week @ 2024-02-22 2324/week @ 2024-02-29 2477/week @ 2024-03-07 3883/week @ 2024-03-14 2675/week @ 2024-03-21

11,873 downloads per month
Used in 19 crates

GPL-3.0-only…

1.5MB
28K SLoC

Slint

Crates.io Docs.rs

A Rust UI toolkit

Slint is a Rust based UI toolkit to build native user interfaces on desktop platforms and for embedded devices. This crate provides the Rust APIs to interact with the user interface implemented in Slint.

The complete Rust documentation for Slint can be viewed online at https://slint.rs/docs/rust/slint/.

Getting Started

The crate documentation shows how to use this crate.

Hello World

The most basic "Hello world" application can be achieved with a few lines of code:

In your Cargo.toml add:

[dependencies]
slint = "1.5.0"

And in your main.rs:

slint::slint!{
    export component HelloWorld {
        Text {
            text: "hello world";
            color: green;
        }
    }
}
fn main() {
    HelloWorld::new().unwrap().run().unwrap();
}

The slint crate documentation contains more advanced examples and alternative ways to use this crate.

To quickly get started, you can use the Template Repository with the code of a minimal application using Slint that can be used as a starting point to your program.

cargo install cargo-generate
cargo generate --git https://github.com/slint-ui/slint-rust-template

More examples

You can quickly try out the examples by cloning this repo and running them with cargo run

# Runs the "printerdemo" example
cargo run --release --bin printerdemo

Dependencies

~8–56MB
~887K SLoC