SystemProbePort

Trait SystemProbePort 

Source
pub trait SystemProbePort: Send + Sync {
    // Required methods
    fn check_all_dependencies(&self) -> Vec<Dependency>;
    fn detect_gpu_info(&self) -> GpuInfo;
    fn get_system_memory_info(&self) -> SystemMemoryInfo;
}
Expand description

Port for probing system dependencies and hardware.

Implementations of this trait perform active system probing by executing commands, querying hardware, etc. The core domain uses this trait to remain pure and testable.

§Example

use gglib_core::ports::SystemProbePort;

fn check_system(probe: &dyn SystemProbePort) {
    let deps = probe.check_all_dependencies();
    let gpu = probe.detect_gpu_info();
    // ...
}

Required Methods§

Source

fn check_all_dependencies(&self) -> Vec<Dependency>

Check all system dependencies and return their status.

Returns a list of dependencies with their installation status, version information, and hints for installation.

Source

fn detect_gpu_info(&self) -> GpuInfo

Detect GPU hardware and acceleration software.

Returns information about available GPUs including NVIDIA/CUDA, AMD/ROCm, and Apple Metal support.

Source

fn get_system_memory_info(&self) -> SystemMemoryInfo

Get system memory information for model fit calculations.

Returns total RAM, GPU memory (if available), and platform info useful for determining which models can run on this system.

Implementors§