sinf 0.1.0

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

Thanks for helping improve `sinf`. This guide covers the local workflow, the
project structure and what a pull request should include.

## Before you start

- Rust **1.95** or newer.
- Linux, macOS, Windows, FreeBSD or NetBSD for platform-specific work.
- For fuzzing: a nightly toolchain and `cargo-fuzz`.

## Build and test

```bash
cargo build
cargo test --features serde
cargo test -- --test-threads=1
cargo fmt -- --check
cargo clippy --lib --tests --features serde -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --features serde
```

For isolated domains:

```bash
cargo check --no-default-features --features system
cargo check --no-default-features --features disk
cargo check --no-default-features --features hardware
```

Fuzzing (nightly):

```bash
cd fuzz
cargo fuzz run dmi -- -max_total_time=60
cargo fuzz run edid -- -max_total_time=60
cargo fuzz run proc_stat -- -max_total_time=60
cargo fuzz run diskstats -- -max_total_time=60
```

## Project layout

- Public API: `src/{system,disk,component,gpu,network,user,hardware,common}/`.
- Module wiring: `src/lib.rs`; convenience re-exports: `src/prelude.rs`.
- OS access: `src/platform/<os>/ffi/`.
- Domain docs: `docs/en/` and `docs/es/`.
- Usage guides: `docs/snippets/` and `docs/es/snippets/`.
- Test helper binaries: `tests/fixtures/` (compiled ad hoc by tests).
- Fuzz targets: `fuzz/fuzz_targets/`.

Read [docs/en/structure.md](docs/en/structure.md) before adding a module or a
platform backend.

## Rules

- Public modules use `#![forbid(unsafe_code)]`; do not add `unsafe` there.
- Keep unsafe inside `platform`/FFI, with a short `// SAFETY` reason when needed.
- Do not add runtime dependencies without a clear justification; default builds
  should stay close to `libc` only.
- Update English and Spanish documentation when behavior changes.
- Comments are at most two lines; one line when possible.
- Add tests for new behavior and run the isolated feature check.

## Pull requests

- **Open every pull request against the `dev` branch, not `main`.**
- Keep changes focused and explain the user-facing impact.
- Include tests, docs and the relevant CI checks.
- Link the issue being fixed.
- Never report security vulnerabilities in a public issue; use
  [SECURITY.md]SECURITY.md.

## Cross-compilation (Raspberry Pi example)

Install the ARM toolchain and target, then configure the linker:

```bash
sudo apt-get install gcc-arm-linux-gnueabihf
rustup target add armv7-unknown-linux-gnueabihf
```

Add to `~/.cargo/config`:

```toml
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
```

Then build with `cargo build --target=armv7-unknown-linux-gnueabihf`.