Crate slint_build

Source
Expand description

This crate serves as a companion crate of the slint crate. It is meant to allow you to compile the .slint files from your build.rs script.

The main entry point of this crate is the compile() function

§Example

In your Cargo.toml:

[package]
...
build = "build.rs"

[dependencies]
slint = "1.9.0"
...

[build-dependencies]
slint-build = "1.9.0"

In the build.rs file:

fn main() {
    slint_build::compile("ui/hello.slint").unwrap();
}

Then in your main file

slint::include_modules!();
fn main() {
    HelloWorld::new().run();
}

Structs§

  • The structure for configuring aspects of the compilation of .slint markup files to Rust.

Enums§

Functions§