4 releases

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

#223 in Windows APIs

Download history 24967/week @ 2024-09-20 30319/week @ 2024-09-27 29339/week @ 2024-10-04 31751/week @ 2024-10-11 29924/week @ 2024-10-18 32079/week @ 2024-10-25 34412/week @ 2024-11-01 32064/week @ 2024-11-08 39159/week @ 2024-11-15 33373/week @ 2024-11-22 38937/week @ 2024-11-29 38008/week @ 2024-12-06 42517/week @ 2024-12-13 27131/week @ 2024-12-20 37202/week @ 2024-12-27 32727/week @ 2025-01-03

145,149 downloads per month
Used in 429 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