# sys-lib v0.2.0 - Design Lock
**The complete 1.0 API, written down and approved.** v0.2.0 locked the public API before any of it is built: every function, type, error, and platform behaviour sys-lib will have at 1.0, with the version each one arrives in. There is still no functional code beyond `VERSION`; the boot kit arrives in 0.3.0.
## What is sys-lib?
<strong>sys-lib</strong> answers the questions a program asks about the machine it runs on, with one plain function call each, on Linux, macOS, and Windows: the operating system and distribution, the CPU, memory, disks, network interfaces and traffic, the host, this process, virtualization and containers, power, and an application-scoped device id. It also carries the boot kit a long-running service needs in its first milliseconds: build info, instance info, and a process guard. It is container-aware, reports unknown facts as unknown, never runs another program, never starts a thread, and has no third-party runtime dependencies.
## What's in 0.2.0
- **`docs/API.md`**: the full 1.0 API, every item with its signature, errors, platform behaviour, estimated cost, the version it arrives in, and examples. The design review added: `os::distro()` and `os::distro_id()`, which answer on every OS ("Ubuntu" on Ubuntu, "Windows" on Windows, "macOS" on a Mac), with `os::is_like()` for distribution families and `os::os_release()` for every os-release field; `cpu::load()`, the load average, with `Load::per_cpu()`; `cpu::is_64bit()` and `cpu::is_32bit()` for the processor; network download and upload rates (`net::traffic()`, `net::Sampler`, `net::totals()`), connection counts (`net::connections()`), and a `Rate` type that prints "12.5 MiB/s" or "104.9 Mbit/s".
- **`docs/SOURCES.md`**: for every reading on every OS, the file, system call, or API it comes from, with units, privileges, and quirks.
- **The OS declaration lists** (crate private) for Linux, macOS and iOS, and Windows: every system call, struct, and constant the readings will use, written by hand from the platform headers. Each struct has size and alignment assertions, and compile-time checks compare its size, alignment, and every field offset with `libc` and `windows-sys`, which are used as test-only dependencies. CI runs those checks on ten targets. They found one real difference before any code used it: musl's `struct rusage` is 272 bytes, not glibc's 144, so a 144-byte buffer could have been overrun under musl.
- **Fixture machines**: `tests/fixtures/capture.sh` copies only the files the Linux backend reads and replaces every identifier with a fake value. Four machines were captured with it: `wsl2`, `wsl2-systemd-scope-limited` (a nested cgroup v2 limit of 256 MiB and 1.5 CPUs), `docker-cgroup2-limited`, and `minimal-scratch` (no os-release, no machine id), the last two on a GitHub runner by a new manual `Fixtures` workflow.
- **Install with Cargo's rename**: `sys = { package = "sys-lib", version = "0.2" }`, and code writes `sys::os::name()` with no import line.
- Decisions D-012 to D-027 in `dev/PLAN.md`, including every open decision, which were accepted as recommended.
## What changed
- `host::load_average()` became `cpu::load()`; `cpu::is_64()` and `cpu::is_32()` became `cpu::is_64bit()` and `cpu::is_32bit()`; network traffic moved from 0.5 to 0.4.
- CI's cross-target job compiles the unit tests too, so the layout checks run for musl, 32-bit Windows, Android, and iOS.
- `tests/fixtures/` and `fuzz/` are left out of the published package.
## What's next
`0.3.0` ships the boot kit WASP's phase 0 needs: build info, instance info, the process guard, OS identity and distribution, CPU counts and name, and the host name, with the bounded reader, the first parsers and their fuzz targets, a distribution corpus of at least 40 real systems, and two more fixture machines (a cgroup v1 host and a bare-metal Linux desktop).