| Crates.io | gfxinfo |
| lib.rs | gfxinfo |
| version | 0.1.2 |
| created_at | 2025-03-23 23:14:14.358193+00 |
| updated_at | 2025-03-24 14:53:06.16658+00 |
| description | Rust library for querying GPU information |
| homepage | |
| repository | https://github.com/SpikeHD/gfxinfo |
| max_upload_size | |
| id | 1603191 |
| size | 62,391 |
Rust library for querying GPU information
use gfxinfo::active_gpu;
let gpu = active_gpu();
println!("GPU vendor: {}", gpu.vendor());
println!("GPU model: {}", gpu.model());
println!("GPU family: {}", gpu.family());
println!("GPU device ID: {}", gpu.device_id());
// And with `gpu_info` feature enabled
let info = gpu.info();
println!("Total VRAM: {} bytes", info.total_vram());
println!("Used VRAM: {} bytes", info.used_vram());
println!("Load: {}%", info.load_pct());
println!("Temperature: {} C", info.temperature() / 1000);
| Feature | Description | Default |
|---|---|---|
default |
Enables all features | Yes |
amd |
Enables AMD GPU support | Yes |
nvidia |
Enables Nvidia GPU support | Yes |
intel |
Enables Intel GPU support | Yes |
gpu_info |
Enables the GpuInfo trait, which provides query functions for things like VRAM usage |
Yes |
(Windows support is speculative, as it uses the Windows API and I don't have a Windows machine to test on. It did work partially in a VM using the basic display driver!)