pub struct HardwareCapabilities {
pub ram_gb: u32,
pub vram_gb: u32,
pub disk_gb: u32,
pub tee_available: bool,
pub cpu_arch: String,
pub cpu_cores: u32,
}Expand description
Hardware capabilities advertised by a provider node.
Used both as a local provisioning input (in tenzro-model::ModelProvisioner)
and as part of the gossiped ProviderAnnouncementMessage payload so that
consumers can route inference / TEE work by available memory, GPU presence,
and CPU shape without an extra round-trip RPC.
Fields§
§ram_gb: u32Total RAM in GiB.
vram_gb: u32Total VRAM in GiB across all GPUs visible to the node (0 if no GPU).
disk_gb: u32Free disk space in GiB at the configured data directory.
tee_available: boolWhether a usable TEE (TDX / SEV-SNP / Nitro / NVIDIA CC) was detected.
cpu_arch: StringCPU architecture string (x86_64, aarch64, …) per std::env::consts::ARCH.
cpu_cores: u32Number of CPU cores reported by std::thread::available_parallelism().
Implementations§
Source§impl HardwareCapabilities
impl HardwareCapabilities
Sourcepub fn detect() -> Self
pub fn detect() -> Self
Detect hardware capabilities from the current system.
Linux: parses /proc/meminfo for MemTotal:.
macOS: shells out to sysctl -n hw.memsize.
All other fields fall back to the Default values; richer detection
(GPU / disk free / TEE probe) is layered in by tenzro-tee and the
node’s startup sequence before the value is broadcast.
Trait Implementations§
Source§impl Clone for HardwareCapabilities
impl Clone for HardwareCapabilities
Source§fn clone(&self) -> HardwareCapabilities
fn clone(&self) -> HardwareCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HardwareCapabilities
impl Debug for HardwareCapabilities
Source§impl Default for HardwareCapabilities
impl Default for HardwareCapabilities
Source§impl<'de> Deserialize<'de> for HardwareCapabilities
impl<'de> Deserialize<'de> for HardwareCapabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for HardwareCapabilities
Source§impl PartialEq for HardwareCapabilities
impl PartialEq for HardwareCapabilities
Source§fn eq(&self, other: &HardwareCapabilities) -> bool
fn eq(&self, other: &HardwareCapabilities) -> bool
self and other values to be equal, and is used by ==.