12 releases

0.3.4 Jan 25, 2023
0.3.3 Dec 16, 2022
0.3.2 Nov 28, 2022
0.2.5 Jul 6, 2022
0.2.1 Mar 10, 2022

#129 in GUI

Download history 131/week @ 2022-10-17 360/week @ 2022-10-24 220/week @ 2022-10-31 469/week @ 2022-11-07 333/week @ 2022-11-14 140/week @ 2022-11-21 586/week @ 2022-11-28 413/week @ 2022-12-05 229/week @ 2022-12-12 262/week @ 2022-12-19 204/week @ 2022-12-26 114/week @ 2023-01-02 183/week @ 2023-01-09 120/week @ 2023-01-16 251/week @ 2023-01-23 272/week @ 2023-01-30

846 downloads per month
Used in 3 crates

GPL-3.0-only…

1MB
20K SLoC

Slint

Crates.io Docs.rs

A Rust UI toolkit

Slint is a UI toolkit that supports different programming languages. Slint is the Rust API to interact with a Slint UI design from Rust.

The complete Rust documentation can be viewed online at https://slint-ui.com/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 = "0.3.4"

And in your main.rs:

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

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

Minimum Supported Rust Version

This crate's minimum supported rustc version is 1.64.

Dependencies

~6–18MB
~362K SLoC