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 = "0.2.1"
...
[build-dependencies]
slint-build = "0.2.1"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
Error returned by the compile function
Functions
Compile the .slint file and generate rust code for it.
Same as compile, but allow to specify a configuration.
This function is for use the application’s build script, in order to print any device specific build flags reported by the backend