winpty-rs-windows-version

Crates.iowinpty-rs-windows-version
lib.rswinpty-rs-windows-version
version0.1.4
created_at2025-08-04 19:39:01.563159+00
updated_at2025-08-04 19:39:01.563159+00
descriptionWindows version information
homepage
repositoryhttps://github.com/microsoft/windows-rs
max_upload_size
id1781079
size20,533
Edgar Andrés Margffoy Tuay (andfoy)

documentation

README

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.winpty-rs-windows-version]
version = "0.1"

Make use of Windows version information as needed:

use winpty_rs_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.")
}
Commit count: 1734

cargo fmt