4 releases

0.1.2 Jan 7, 2025
0.1.1 Apr 12, 2024
0.1.0 Nov 15, 2023
0.0.0 Mar 7, 2023

#124 in Windows APIs

Download history 31117/week @ 2024-10-08 32342/week @ 2024-10-15 29712/week @ 2024-10-22 33141/week @ 2024-10-29 33825/week @ 2024-11-05 36651/week @ 2024-11-12 34015/week @ 2024-11-19 38514/week @ 2024-11-26 36605/week @ 2024-12-03 41989/week @ 2024-12-10 35805/week @ 2024-12-17 35171/week @ 2024-12-24 31416/week @ 2024-12-31 42759/week @ 2025-01-07 39370/week @ 2025-01-14 37850/week @ 2025-01-21

159,904 downloads per month
Used in 438 crates (11 directly)

MIT/Apache

15KB
164 lines

Windows version information

The windows-version crate provides reliable operating system version information without the need for application manifest files.

Start by adding the following to your Cargo.toml file:

[dependencies.windows-version]
version = "0.1"

Make use of Windows version information as needed:

use windows_version::*;

println!("Current version: {:?}", OsVersion::current());

if is_server() {
    println!("Running on a Windows Server release.");
}

if OsVersion::current() >= OsVersion::new(10, 0, 0, 12345) {
    println!("Can use a feature available on this version or later.")
}

Dependencies

~0–8.5MB