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 onlibc; 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 auditandcargo 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
The rustdoc API is available at https://docs.rs/sinf.
Install
[]
= "0.1"
Default features: system, disk, component, gpu, network, user, hardware.
Extra features: serde and multithread.
Quick start
use ;
let mut sys = new_with_specifics?;
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>/statand/proc/diskstatsparsers 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.