winpty-rs-windows-version 0.1.4

Windows version information
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented1 out of 5 items with examples
  • Size
  • Source code size: 20.53 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 191.55 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • microsoft/windows-rs
    12707 658 36
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • andfoy

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.")
}