Skip to content

Icelain/rin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Docs

rin

A small rust library to fetch system information on linux

Installation

Add rin-sys = "0.1.3" to your Cargo.toml

Base structs

RAM info -

#[derive(Default, Debug)]
pub struct RamInfo {
   pub mem_used: usize,
   pub mem_free: usize,
   pub mem_total: usize,
   pub percent_free: f32,
   pub percent_used: f32,
}

CPU info -

#[derive(Debug, Default)]
pub struct CpuInfo {
   pub cache_size: String,
   pub cores: usize,
   pub cpu_speed: Vec<(usize, f64)>,
   pub model_name: String,
   pub vendor_id: String,
   pub is_fpu: bool,
   pub cpuid_level: f32,
}

About

A small rust library to fetch system information on linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages