#posix #hostname #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

#970 in Unix APIs

Download history 1634/week @ 2025-11-14 1661/week @ 2025-11-21 1601/week @ 2025-11-28 1992/week @ 2025-12-05 1685/week @ 2025-12-12 1627/week @ 2025-12-19 1376/week @ 2025-12-26 1537/week @ 2026-01-02 1805/week @ 2026-01-09 1875/week @ 2026-01-16 1819/week @ 2026-01-23 2102/week @ 2026-01-30 2214/week @ 2026-02-06 2565/week @ 2026-02-13 2215/week @ 2026-02-20 2254/week @ 2026-02-27

9,631 downloads per month
Used in 5 crates (2 directly)

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