purefetch: The zero-dependency Rust system info tool you didn’t know you needed

Imagine a system info fetcher that needs nothing—not libc, not crates.io, not even color libraries. That’s purefetch, a new 484 KiB Rust utility built entirely from std plus raw Linux syscalls.
Why it stands out
Most system info tools lean on external crates like sysinfo or nix to parse /proc and /sys, but purefetch avoids them completely. The only exceptions are two Linux syscalls—statfs for disk usage and ioctl for terminal size and TTY checks—handled via inline assembly. Four architectures are supported: x86_64, aarch64, riscv64, and loongarch64, each with architecture-specific syscall conventions. The author cross-compiled and tested each one under QEMU to confirm the raw calls work end-to-end.
A ZFS wrinkle and a logo lesson
On ZFS-on-root systems, MemTotal - MemAvailable can misreport RAM usage because the kernel’s ARC cache isn’t counted as reclaimable. purefetch subtracts the reclaimable ARC (arcstats.size - c_min) to match tools like Fastfetch and ZFS-aware htop. In one case, this cut the reported usage from 37 GiB to 15 GiB.
Logo rendering also taught a hard lesson. The original Python logo generator emitted color codes without the proper truecolor prefix, turning vibrant brand colors into washed-out text. After a few renders without color enabled, the bug stayed hidden until manual inspection.
Source: DEV Community. AI-assisted editorial synthesis — TechnoExpress.

