sinf 0.1.0

Library for obtaining in-depth system information at both the hardware and software levels
Documentation

Why sinf

  • Typed, refreshable snapshots of the local system, with platform data parsed inside the library.
  • Modular by domain: enable only the features you need.
  • Safe public API: public modules use #![forbid(unsafe_code)]; OS access stays behind safe platform wrappers.
  • Direct reads: uses procfs/sysfs, Win32, IOKit and BSD syscalls. On Linux the default build depends only on libc; platform crates are used only on their targets.
  • Hardware inventory on Linux: BIOS/SMBIOS, RAM modules, PCI, USB, batteries, sensors, displays and storage.
  • Checked: cross-platform CI, fuzzing, cargo audit and cargo deny.

Supported platforms

Platform Status
Linux, Android, Raspberry Pi Full backend
Windows Full backend
macOS, iOS Shared Apple backend
FreeBSD, NetBSD Full backend
Other targets Rejected at compile time with a clear error

Hardware inventory is Linux-only; other platforms return Error::Unsupported for the hardware module. Minimum supported Rust version: 1.95.

Documentation

English Español
Start here Empieza aquí
API reference Referencia de la API
Architecture Arquitectura
Structural conventions Convenciones estructurales
Security Seguridad
Features and platforms Features y plataformas
PCI vendor IDs IDs de vendor PCI
Usage guides Guías de uso

The rustdoc API is available at https://docs.rs/sinf.

Install

[dependencies]
sinf = "0.1"

Default features: system, disk, component, gpu, network, user, hardware. Extra features: serde and multithread.

Quick start

use sinf::system::{RefreshKind, System};

let mut sys = System::new_with_specifics(RefreshKind::everything())?;
sys.refresh_all();

Values based on differences, such as CPU or network usage, require two refreshes. Keep one System instance for the lifetime of your program.

See the system guide and the API reference for the complete API.

Feature overview

Feature Default Adds
system yes System, CPU, memory, processes, motherboard and product
disk yes Disks, mounts and I/O
component yes Temperature and component sensors
gpu yes GPU identity, usage and memory
network yes Interfaces, addresses and traffic
user yes Local users and groups
hardware yes Firmware, PCI, USB, batteries, sensors, displays and storage
serde no Serialization/deserialization of supported types
multithread no Parallel refresh with rayon

Quality and security

  • Public API modules forbid unsafe.
  • OS access is isolated behind platform/FFI wrappers.
  • DMI, EDID, /proc/<pid>/stat and /proc/diskstats parsers have fuzz targets.
  • Monthly dependency and supply-chain checks.
  • CI runs on Linux, Windows, macOS, iOS simulator, FreeBSD and NetBSD.

See SECURITY.md for reporting and scope.

Community

License

GPL-3.0-or-later. See LICENSE.