2 releases
0.1.1 | Jan 2, 2025 |
---|---|
0.1.0 | Dec 27, 2024 |
#332 in Unix APIs
284 downloads per month
15KB
308 lines
System-info-lite: A library for Getting System Information
In system-info-lite
, a group of APIs are defined to get some system information, including CPU, GPU, RAM, and OS information.
Usage
use system_info_lite::{get_system_info, get_cpu_info, get_ram_info, get_os_info};
// Get system information, including CPU, GPU, RAM, and OS information.
let info = get_system_info();
println!("{:#?}", info);
// Get CPU information.
let cpu_info = get_cpu_info();
println!("{:#?}", cpu_info);
// Get RAM information.
let ram_info = get_ram_info();
println!("{:#?}", ram_info);
// Get GPU information.
let gpu_info = get_gpu_info().unwrap();
println!("{:#?}", gpu_info);
// Get OS information.
let os_info = get_os_info();
println!("{:#?}", os_info);
lib.rs
:
A library for getting system information, including CPU, GPU, RAM, and OS information.
This library provides a set of APIs to retrieve system information, including CPU, GPU, RAM, and OS information. It supports both macOS and Linux systems.
Usage
use system_info_lite::{get_system_info, get_cpu_info, get_ram_info, get_os_info};
use serde_json::json;
let info = get_system_info().unwrap();
println!("{}", json!(info));
Dependencies
~3–11MB
~127K SLoC