slint/tests/manual/module-builds/blogicb/build.rs
Benny Sjöstrand 0bda0a64eb
Add support for importing Rust types from another crate Slint compilation (#9329)
To implement an external Slint library, the types and components implemented
in the .slint files needs to be exposed through the Rust crate.
A simple example example/app-library is added to demonstrate how to use this feature.

CC #7060
2025-09-16 09:01:44 +02:00

9 lines
296 B
Rust

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT
fn main() -> Result<(), slint_build::CompileError> {
let config = slint_build::CompilerConfiguration::new().as_library("BLogicB");
slint_build::compile_with_config("ui/blogicb.slint", config)?;
Ok(())
}