#reader #read #shm #reg #wmi #aida64 #wmis

aida64-reader-rs

AIDA64 的数据读取器

6 个版本

0.1.33 2024年6月10日
0.1.32 2024年6月10日

#2#reg

45 每月下载量

MIT 许可证

8KB
135

示例

# 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));
    }
}

依赖项

~0.4–27MB
~386K SLoC