fn main() { // `cfg(web)`: WebAssembly in a browser (the web version, apps/web). println!("cargo::rustc-check-cfg=cfg(web)"); if std::env::var("CARGO_CFG_TARGET_FAMILY").as_deref() == Ok("wasm") && std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("unknown") { println!("cargo::rustc-cfg=web"); } // Embeds the application icon into the Windows executable. if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") { let mut res = winresource::WindowsResource::new(); res.set_icon("../../packaging/windows/chesspenguin.ico"); if let Err(e) = res.compile() { println!("cargo:warning=could not embed the Windows icon: {e}"); } } }