Registry / utility / nvml-wrapper

nvml-wrapper

JSON →
library0.12.1rscratesunverified

A safe and ergonomic Rust wrapper for the NVIDIA Management Library (NVML), providing access to GPU monitoring and management functions.

# Cargo.toml [dependencies] nvml-wrapper = "0.12.1"
INSTALL
IMPORT
SIG · NVML-WRAPPER
N
nvml-wrapper
utilityrustv0.12.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Nvml
✓ use nvml_wrapper::Nvml;

Initializes NVML and prints the number of detected NVIDIA GPUs.

use nvml_wrapper::Nvml; fn main() -> Result<(), Box<dyn std::error::Error>> { let nvml = Nvml::init()?; let device_count = nvml.device_count()?; println!("Number of NVIDIA GPUs: {}", device_count); Ok(()) }
Debug
Known issues
gotchaRequires the NVIDIA Management Library (NVML) to be installed on the system; otherwise initialization fails.
fix
Install NVIDIA drivers and NVML (usually included with the driver). On Linux, ensure `libnvidia-ml.so` is in the library path.
affects: *
Upgrade
Version history
0.12.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
nvml-wrapper — cargo add nvml-wrapper · libregistry