How do I determine my Windows OS version with Rust?

Viewed 115

Can I use cfg to determine the OS Windows version for this block of code? The thing is that shcore lib is not available in windows 7 and below

#[cfg(all(windows, not(feature = "inline")))]
        unsafe {
        winapi::um::shellscalingapi::SetProcessDpiAwareness(2);
    }
0 Answers
Related