treewide: remove nix dependency, add custom syscall wrappers & UtsName

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib880f4bafe9d3bbc944af4b9125256366a6a6964
This commit is contained in:
raf 2025-11-17 21:27:28 +03:00
commit 75132ff172
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
8 changed files with 358 additions and 72 deletions

View file

@ -1,11 +1,14 @@
mod colors;
mod desktop;
mod release;
mod syscall;
mod system;
mod uptime;
use std::io::{Write, stdout};
pub use microfetch_lib::UtsName;
use crate::{
colors::print_dots,
desktop::get_desktop_info,
@ -24,7 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
if Some("--version") == std::env::args().nth(1).as_deref() {
println!("Microfetch {}", env!("CARGO_PKG_VERSION"));
} else {
let utsname = nix::sys::utsname::uname()?;
let utsname = UtsName::uname()?;
let fields = Fields {
user_info: get_username_and_hostname(&utsname),
os_name: get_os_pretty_name()?,