rin-sys

Crates.iorin-sys
lib.rsrin-sys
version0.1.3
sourcesrc
created_at2022-01-26 08:22:27.269283
updated_at2023-03-06 18:09:26.737491
descriptionA small library to fetch system information in linux
homepage
repositoryhttps://github.com/icelain/rin
max_upload_size
id521409
size8,208
(Icelain)

documentation

README

Rust Docs

rin

A small rust library to fetch system information on linux

Installation

Add rin-sys = "0.1.2" 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: String,
   pub model_name: String,
   pub vendor_id: String,
   pub is_fpu: bool,
   pub cpuid_level: f32,
}
Commit count: 32

cargo fmt