1 2 3 4 5 6 7 8 9
fn main() { // Embed the icon into the Windows executable #[cfg(target_os = "windows")] { let mut res = winresource::WindowsResource::new(); res.set_icon("icons/icon.ico"); res.compile().expect("Failed to compile Windows resources"); } }