crosswin 0.4.0

Async-friendly Windows primitives for Rust with process management, memory monitoring, and system operations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crosswin::prelude::*;

fn main() -> crosswin::Result<()> {
    let info = get_system_info()?;
    println!("System info: {:?}", info);

    match get_system_uptime() {
        Ok(u) => println!("Uptime: {:?}", u),
        Err(e) => println!("Uptime not supported: {}", e),
    }

    match get_boot_time() {
        Ok(t) => println!("Boot time (approx): {:?}", t),
        Err(e) => println!("Boot time not supported: {}", e),
    }

    Ok(())
}