use std::{env, error::Error}; fn main() -> Result<(), Box> { if env::var("CARGO_CFG_TARGET_FAMILY")? == "windows" { embed_resource::compile("resources/assets/manifest.rc", embed_resource::NONE); } Ok(()) }