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

no-std slint

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

33 releases (20 stable)

1.8.0 Sep 23, 2024
1.7.1 Jul 25, 2024
1.5.1 Mar 20, 2024
1.3.2 Dec 1, 2023
0.2.1 Mar 10, 2022

#21 in GUI

Download history 7694/week @ 2024-07-19 8054/week @ 2024-07-26 7222/week @ 2024-08-02 9642/week @ 2024-08-09 9803/week @ 2024-08-16 9174/week @ 2024-08-23 8970/week @ 2024-08-30 9970/week @ 2024-09-06 10540/week @ 2024-09-13 13521/week @ 2024-09-20 12626/week @ 2024-09-27 11518/week @ 2024-10-04 10678/week @ 2024-10-11 12819/week @ 2024-10-18 10580/week @ 2024-10-25 10792/week @ 2024-11-01

46,265 downloads per month
Used in 30 crates (28 directly)

GPL-3.0-only…

1.5MB
31K 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.8.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, use the Template Repository with the code of a minimal application using Slint as a starting point for your program.

  1. Download and extract the ZIP archive of the Rust Template.
  2. Rename the extracted directory and change into it:
mv slint-rust-template-main my-project
cd my-project

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

~11–53MB
~872K SLoC