Crates.io | systemd_info |
lib.rs | systemd_info |
version | 1.0.0 |
source | src |
created_at | 2024-05-22 10:40:48.780045 |
updated_at | 2024-05-22 10:40:48.780045 |
description | Obtain some system information through WMIC |
homepage | |
repository | https://github.com/spdrwcn/systemd_info |
max_upload_size | |
id | 1247784 |
size | 5,683 |
mac_conditions
Supported platforms: Any version of Windows that supports WMIC.
use systemd_info;
fn main() {
let serial_number = systemd_info::get_bios_serial_number().unwrap();
let cpu_name = systemd_info::cpu_name().expect("Failed to get CPU name");
let ramgb = systemd_info::ram_info().expect("Failed to get RAM name");
let disk_info = systemd_info::get_disk_info().expect("Failed to get DISK name");
let gpu_name = systemd_info::get_gpu_info().expect("Failed to get GPU name");
println!("Serial Number: {}", serial_number);
println!("CPU Name: {}", cpu_name);
println!("RAM: {} GB", ramgb);
println!("Disk: {}", disk_info);
println!("GPU: {}", gpu_name);
}
mac_conditions
is licensed under both MIT and Apache 2.0