#posix #hostname #uname #utsname

uname-rs

No dependency, panic-less implementation of the POSIX utsname header and struct in Rust

2 releases

0.1.1 May 4, 2021
0.1.0 May 1, 2021

#895 in Unix APIs

Download history 737/week @ 2024-07-25 542/week @ 2024-08-01 612/week @ 2024-08-08 625/week @ 2024-08-15 601/week @ 2024-08-22 766/week @ 2024-08-29 615/week @ 2024-09-05 525/week @ 2024-09-12 705/week @ 2024-09-19 765/week @ 2024-09-26 630/week @ 2024-10-03 634/week @ 2024-10-10 555/week @ 2024-10-17 740/week @ 2024-10-24 655/week @ 2024-10-31 718/week @ 2024-11-07

2,848 downloads per month
Used in 4 crates (via bpf-compatible-rs)

Apache-2.0

6KB
53 lines

Uname-rs

No dependency, panic-less implementation of the POSIX utsname header and struct in Rust.

Taken from my project rfetch

use std::io::Result;
use uname_rs::Uname;

fn main() -> Result<()> {
	let uts = Uname::new()?;

	println!("{}", uts.sysname);

	Ok(())
}

No runtime deps