Crates.io | slint |
lib.rs | slint |
version | 1.8.0 |
source | src |
created_at | 2022-02-01 16:40:32.565183 |
updated_at | 2024-09-23 11:47:02.792795 |
description | GUI toolkit to efficiently develop fluid graphical user interfaces for embedded devices and desktop applications |
homepage | https://slint.rs |
repository | https://github.com/slint-ui/slint |
max_upload_size | |
id | 525267 |
size | 493,374 |
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/.
The crate documentation shows how to use this crate.
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.
mv slint-rust-template-main my-project
cd my-project
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