6 releases

Uses new Rust 2021

0.2.4 May 9, 2022
0.2.3 May 9, 2022
0.2.1 Mar 10, 2022
0.2.0 Feb 10, 2022
0.0.0 Feb 1, 2022

#13 in Rendering engine

Download history 14/week @ 2022-01-30 177/week @ 2022-02-06 237/week @ 2022-02-13 151/week @ 2022-02-20 123/week @ 2022-02-27 153/week @ 2022-03-06 132/week @ 2022-03-13 117/week @ 2022-03-20 185/week @ 2022-03-27 136/week @ 2022-04-03 131/week @ 2022-04-10 150/week @ 2022-04-17 130/week @ 2022-04-24 287/week @ 2022-05-01 259/week @ 2022-05-08 307/week @ 2022-05-15

1,009 downloads per month
Used in 2 crates

GPL-3.0-only OR LicenseRef-Slint-commercial

785KB
14K 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.2.4"

And in your main.rs:

slint::slint!{
    HelloWorld := Window {
        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.59.

Dependencies

~7–20MB
~404K SLoC