Skip to main content

Module system

Module system 

Source
Expand description

§system

System utility types for dependency and environment detection.

This module provides pure domain types for system dependencies, GPU information, and memory details. Active system probing is implemented by DefaultSystemProbe in gglib-runtime.

§Architecture Note

Core defines types + the SystemProbePort trait (in ports::system_probe). Runtime implements DefaultSystemProbe which performs actual system queries.

packages follows the same split, which is what keeps it here rather than in the runtime: parse_os_release takes the contents of /etc/os-release and returns a LinuxDistro, so the decision is pure and testable against files from distributions no CI machine runs, while the std::fs call that produces those contents lives in gglib_runtime::system::detect_linux_distro.

It is the single source of truth for what each dependency is called on each distribution — used by the dependency probe’s install hints, by gglib config check-deps, and by the llama.cpp build’s own prerequisite message, which previously each carried their own copy and had drifted apart.

Modules

ModuleLOCComplexityCoverage
packages.rs
types.rs

Modules§

packages 🔒
Linux distribution identity and the package names that follow from it.
types 🔒
System dependency and GPU detection types.

Structs§

Dependency
Information about a system dependency.
GpuInfo
GPU hardware detection result.
PackageNames
What one dependency is called on each family.
SystemMemoryInfo
System memory information for model fit calculations.

Enums§

DependencyStatus
Represents the status of a system dependency.
LinuxDistro
Distribution family, which is what package names actually key off.

Functions§

install_hint
A ready-to-run install command for one dependency, e.g. pacman -S libayatana-appindicator.
packages_for
Package names for a dependency.
parse_os_release
Identify the distribution family from the contents of /etc/os-release.