#information #cpu-memory #system-information #disk #cpu #memory #graphic

sys sys-info-extended

This crate is a fork of https://crates.io/crates/sys-info crate and extended version of it

18 releases (4 stable)

Uses old Rust 2015

new 1.1.0 Dec 25, 2024
0.9.2 Dec 18, 2024
0.8.1 Oct 18, 2024
0.4.0 Apr 1, 2024
0.3.0 Feb 6, 2024

#447 in Operating systems

Download history 387/week @ 2024-09-09 48/week @ 2024-09-16 123/week @ 2024-09-23 78/week @ 2024-09-30 7/week @ 2024-10-07 227/week @ 2024-10-14 46/week @ 2024-10-21 12/week @ 2024-10-28 2/week @ 2024-11-04 7/week @ 2024-11-18 94/week @ 2024-12-02 246/week @ 2024-12-09 157/week @ 2024-12-16 487/week @ 2024-12-23

984 downloads per month
Used in incli

MIT license

135KB
3K SLoC

Rust 2K SLoC // 0.0% comments C 1K SLoC // 0.1% comments

sys-info-extended

Get system information in Rust.

This crate is a fork of sys-info crate, and i'll continue to develop. Contributions are welcome especially for mac os. And c api's.

For now it supports Linux, Mac OS X, illumos, Solaris, FreeBSD, OpenBSD, NetBSD and Windows.

I especially focused on very practical informations about system(computer type, user name, public ipv4 address etc.) and especially Windows api's. Because of that, in my opinion it's the best crate for getting system info especially for windows. I aim the include outputs of all windows classes in future releases. So if you're a game developer or windows programmer, this will be one of the go-to crates for you.

And that crate also includes some system info's for linux, for example home directory of user and shell path.

If you like this liblary, give a star on it's github repo

Usage

Add this to Cargo.toml:

[dependencies]
sys-info-extended = "1.0.0"

and add this to crate root:


use sys_info_extended::{os_type, os_release, get_graphics_info, get_system_env_var, get_public_ipv4_address, append_env, set_env};

use some functions:


let our_os_type = os_type().unwrap();
let os_release = os_release().unwrap();
let graphics = get_graphics_info();
let path_env = get_system_env_var("PATH").unwrap();
let ip_address = get_public_ipv4_address();

let env_option = EnvOptions {
    name: "A Env name that not exist",
    value: "A value",
    level: EnvLevel::User
}

set_env(env_option);

Already Planned Features For Next Releases

  • Optimizations and idiomaticizations on later implemented functions.
  • adding get_download_speed() function which measures your network's download speed.
  • Camera Infos
  • USB Infos
  • Mouse Infos
  • All other windows system classes

Dependencies

~64–410KB