mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-18 19:22:18 +00:00
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
9 lines
296 B
Rust
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(())
|
|
}
|