mirror of
https://github.com/hulthe/inkopslista.git
synced 2026-08-03 23:11:28 +02:00
15 lines
523 B
Rust
15 lines
523 B
Rust
use std::env;
|
|
|
|
fn main() {
|
|
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("target arch env");
|
|
let style = match target_arch.as_str() {
|
|
// For web, rely on dark mod detection based on browser settings.
|
|
"wasm32" => "cosmic",
|
|
|
|
// For any other target, force dark mode.
|
|
_ => "cosmic-dark",
|
|
};
|
|
let config = slint_build::CompilerConfiguration::new().with_style(style.into());
|
|
slint_build::compile_with_config("ui/app.slint", config).expect("Slint build failed");
|
|
}
|