slint/api/rs/slint
Olivier Goffart 45abc7a627 partial_renderer: Separate the geometry tracker from the rendering tracker
This way we avoid rendering when only the layout is dirty but didn't
actually change
2025-10-08 21:08:37 +02:00
..
LICENSES Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
tests partial_renderer: Separate the geometry tracker from the rendering tracker 2025-10-08 21:08:37 +02:00
android.rs Add --generate-link-to-definition in the docs of all our published crate 2025-06-06 21:47:36 +02:00
Cargo.toml wgpu: Added support for wgpu 27 with Skia 2025-10-06 19:10:31 +02:00
compile_fail_tests.rs Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
docs.rs ComponentHandle: don't rely on the Inner to be a VRc<ItemTreeVTable> 2025-07-04 10:07:22 +02:00
lib.rs Remove doc_auto_cfg feature 2025-10-08 09:22:35 +02:00
mcu.md Prepeare for release: update version in docs 2025-09-03 14:53:09 +02:00
private_unstable_api.rs Change the Rotate item to a Transform that supports scaling (#9387) 2025-09-15 21:14:33 +12:00
README.md Prepeare for release: update version in docs 2025-09-03 14:53:09 +02:00
type-mappings.md Change foo type from i32 to int for Slint's struct 2024-03-04 08:59:32 +01:00

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.13"

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