| Crates.io | lxinfo |
| lib.rs | lxinfo |
| version | 0.1.2 |
| created_at | 2023-03-03 02:07:07.600311+00 |
| updated_at | 2023-03-03 02:07:07.600311+00 |
| description | Linux System Information for systemd systems |
| homepage | |
| repository | |
| max_upload_size | |
| id | 799317 |
| size | 10,287 |
Warning: This is only meant to be used under Linux and relies on files such as
/etc/os-releaseand/proc/meminfo.If you don't have those files and lack certain other features, such as
uname, then it won't work as it wasn't made to be cross-platform.
Linux System Information through libc and parsing system files.
fn main() {
// Basic way of grabbing your username.
let username = info::get_system_information().unwrap().username;
println!("Your username is: {username}")
}