Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vars1ty/lxinfo
Linux System Information crate
https://github.com/vars1ty/lxinfo
cargo crate linux linux-rust rust rust-crate system system-info system-information systemd
Last synced: about 1 month ago
JSON representation
Linux System Information crate
- Host: GitHub
- URL: https://github.com/vars1ty/lxinfo
- Owner: vars1ty
- License: mit
- Created: 2023-01-14T20:03:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T02:04:57.000Z (almost 2 years ago)
- Last Synced: 2024-10-25T11:43:57.249Z (3 months ago)
- Topics: cargo, crate, linux, linux-rust, rust, rust-crate, system, system-info, system-information, systemd
- Language: Rust
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lxinfo
> **Warning**:
> This is only meant to be used under Linux and relies on files such as `/etc/os-release` and `/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.
## Usage
```rust
fn main() {
// Basic way of grabbing your username.
let username = info::get_system_information().unwrap().username;
println!("Your username is: {username}")
}
```