aida64-reader-rs

Crates.ioaida64-reader-rs
lib.rsaida64-reader-rs
version0.1.33
sourcesrc
created_at2024-06-09 21:03:17.520387
updated_at2024-06-10 09:53:24.842992
descriptiona data reader from AIDA64
homepagehttps://github.com/Yoak3n/aida64-reader-rs
repositoryhttps://github.com/Yoak3n/aida64-reader-rs
max_upload_size
id1266622
size11,435
Yoake (Yoak3n)

documentation

README

Example

# default use feature "shm"(read data from shared memory)
[dependencies]
aida64-reader-rs = "*"

# you can also choose feature "reg" (read data from registry) and feature "wmis" (read data from wmi)
[dependencies]
aida64-reader-rs = {version = "*", default-features = false, feature = ["reg"] }
aida64-reader-rs = {version = "*", default-features = false, feature = ["wmis"] }

use std::collections::HashMap;
use aida64_reader_rs::shm;

fn main() {
    loop {
        let mut dictionary:HashMap<&str,&str> = HashMap::new();
        match shm::read_from_shared_memory()  {
            Ok(datas) => {
                datas.iter().for_each(|d| {
                    dictionary.insert(d.id.as_str(),d.value.as_str());  
                });
                println!("{:?}",dictionary);
            },
            Err(e) => panic!("{}",e),
        }
        std::thread::sleep(std::time::Duration::from_millis(1000));
    }
}
Commit count: 10

cargo fmt