NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4315 most downloaded on crates.io
A safe and ergonomic Rust wrapper for the NVIDIA Management Library
Last release 1 months ago
31 Aug 2026
Ships fairly regularly
a new release about every 9 months
Nearly every release is documented
notes for 15 of 15 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
15 releases · first in 2017
Breaking : Device::active_vgpus() now returns Vec<VgpuInstance<'_>> instead of raw vGPU instance ids, and drops its explicit lifetime clause ( #130 ,
Device::active_vgpus() now returns Vec<VgpuInstance<'_>> instead of raw vGPU instance ids, and drops its explicit lifetime clause (#130, #144)nvml-wrapper-sys 0.10.0 (#139)VgpuInstance wrapper with methods for UUID, VM id, framebuffer usage, encoder/FBC sessions and stats, license info, metadata, placement id, runtime state size, mdev UUID, guest driver version, ECC and accounting modes, and more; new VgpuType methods (bar1_info(), fb_reservation(), gsp_heap_size()); new vGPU enum and struct wrappersVgpuInstance::new() is public, allowing construction from a raw vGPU instance id (#144)Device::power_mizer_mode() and Device::set_power_mizer_mode() for NVML v580 PowerMizer mode support (#140)GpmSample::from_handle() (unsafe) to reconstruct a GpmSample from its raw handle, with a documented ownership contract (#141, #143)VgpuInstance::instance_type() takes &self instead of &'dev self, so the returned VgpuType no longer keeps the instance borrowed for the device's lifetime (#144)Also released alongside: nvml-wrapper-sys 0.10.0 — bindings regenerated using the NVML 13.0.39 header (CUDA 13, sourced from NVIDIA/go-nvml v0.13.0-1) and bindgen 0.72.1 (#139). Function signatures are preserved; some public constants changed value (e.g. NVML_API_VERSION is now 13). Field IDs 251-273 retain v12 numbering so the wrapper's runtime remapping logic is unaffected.
One column per quarter.
Corrected NVML_FI_PWR_SMOOTHING_* field IDs which used CUDA 13.0U1 numbering instead of v12, causing silent data corruption on CUDA 12 hosts (#134, #1
NVML_FI_PWR_SMOOTHING_* field IDs which used CUDA 13.0U1 numbering instead of v12, causing silent data corruption on CUDA 12 hosts (#134, #137)nvmlDeviceGetActiveVgpus argument ordering (#128)FieldIdScheme enum and Nvml::field_id_scheme() to inspect the detected driver's field ID numberingchore: Release nvml-wrapper version 0.12.0
chore: Release nvml-wrapper version 0.12.0
From<NvmlError> for nvmlReturn_t conversion (#117)Full Changelog: v0.11.0...v0.12.0
Fixes, improvements, and updates for NVML 12.8.90.
And nvml-wrapper-sys 0.9.0
Fixes, improvements, and updates for NVML 12.8.90.
And 0.8.0 of nvml-wrapper-sys
And 0.8.0 of nvml-wrapper-sys
Updates for NVML 12.2.
Device
pcie_link_speed()DeviceArchitecture
AdaHopperenums::device
PcieLinkMaxSpeed
2021rust-hook from development workflowmacos-latestThe MSRV of this release is 1.60.0. This is for usage of namespaced features.
bitflags: 1.3 -> 2.4.0libloading: 0.7.0 -> 0.8.1wrapcenum-derive: 0.4.0 -> 0.4.1Release 0.9.0 And 0.7.0 of nvml-wrapper-sys
Release 0.9.0
And 0.7.0 of nvml-wrapper-sys
Downgrade indexmap
In order to downgrade hashbrown to avoid requiring Rust 2021 edition
Bug fixes, improvements, and updates for NVML 11.8.
#[doc(alias = "...")] attribute to make them searchable by C function name in rustdoc (#31 - @arpankapoor)legacy-functions crate feature
running_compute_processes_v2running_graphics_processes_v2enum_wrappers::device
Brand
Device
running_compute_processes()
Cargo.toml files have been updated to avoid using the now-deprecated slash syntax (#32 - @KisaragiEffective)The MSRV of this release continues to be 1.51.0.
Release 0.8.0
Release 0.8.0 (#30)
Updates for the latest version of NVML (11.6 update 2). More wrapped methods!
Device:
set_mem_locked_clocks() (#27 - @benrod3k)reset_mem_locked_clocks()num_cores()num_fans()bus_type()power_source()architecture()pcie_link_max_speed()memory_bus_width()irq_numNVML struct has been renamed to Nvml (#22 - @TheJltres)basic_usage example now prints your device's architecture and number of CUDA coresNvml have been renamed:
Nvml::blacklist_device_count() -> Nvml::excluded_device_count()Nvml::blacklist_device_info() -> Nvml::excluded_device_info()BlacklistDeviceInfo renamed to ExcludedDeviceInfoProcessInfo gained new fields:
gpu_instance_idcompute_instance_idDevice:
Device::name() now creates a buffer sized to the new NVML_DEVICE_NAME_V2_BUFFER_SIZE constantDevice::running_compute_processes() and Device::running_graphics_processes() now allocate a bit of headroom in case the process count increases between when they make a call to figure out how much to allocate and when they make a call to get dataDevice::set_gpu_locked_clocks() now takes in GpuLockedClocksSetting allowing for both numeric ranges and symbolic boundariesThe MSRV of this release is 1.51.0. This is needed for const generics and the ability to implement Debug for arrays of any size.
libloading: 0.6.6 -> 0.7.0#[ignore] attribute. The test-local feature has been removed as a resultCargo.lock file is now committed to the repoDynamically loading the NVML library at runtime is here! Thanks to a new bindgen feature that landed recently, nvml-wrapper-sys now has regenerated bi
Dynamically loading the NVML library at runtime is here! Thanks to a new bindgen feature that landed recently, nvml-wrapper-sys now has regenerated bindings that make use of the libloading crate and don't require linking to NVML at compile-time.
This means it's now possible to drop NVIDIA-related features in your code at runtime on systems that don't have relevant hardware.
The MSRV of this release is 1.42.0.
NVML struct:
builderNvmlBuilder struct
bitmasks
POWER_SOURCE_CHANGEMIG_CONFIG_CHANGENO_ATTACHDevice struct:
new (replaces the From<nvmlDevice_t> impl)nvmlEventSet struct:
new (replaces the From<nvmlEventSet_t> impl)EventData struct:
new (replaces the From<nvmlEventData_t> impl)Unit struct:
new (replaces the From<nvmlUnit_t> impl)nvmlNvmlError
LibloadingErrorFailedToLoadSymbolInitFlags now implements DefaultNvmlError and NvmlErrorWithSource no longer implement Clone, Eq, or PartialEq
libloading::Error doesn't implement themFieldValueSample no longer implements Clone or PartialEqNvmlError::UnexpectedVariant now contains a u32 instead of an i32 due to a change in the types of the generated bindingslibloading: new dependency on 0.6.6static_assertions: new dependency on 1.1.xBump nvml-wrapper version to 0.6.0
Bump nvml-wrapper version to 0.6.0
This release was focused on cleanup and migrating a crate originally written in 2016 to modern Rust conventions. Notably, error-chain has been ripped out of the crate entirely and replaced with an error enum that implements std::error::Error.
Additionally, the wrapcenum-derive dependency (a derive macro used to simplify API generation internally) has been completely re-written and now depends on the 1.0 releases of syn and quote. There are no user-facing changes as a result of this rewrite, but your crate's dependency tree will likely be very pleased.
The MSRV of this release is 1.42.0.
nvml-wrapper updated to Rust 2018 editionnvml-wrapper-sys updated to Rust 2018 editionwrapcenum-derive has been re-written and now depends on modern versions of syn and quote#[inline] attribute from all functionsDevice.handle(), EventSet.handle(), Unit.handle()error-chain out of crate entirely
NvmlError enum that implements std::error::Errortry_from() methods to implementations of std::convert::TryFromtry_into_c() methods to implementations of std::convert::TryIntobitflags: 1.0.x -> 1.2.xthiserror: new dependency on 1.0.xerror-chain: no longer a dependencyA long time in the works, 0.5.0 contains the last two years of my extremely sporadic work wrapping some of the new functionality provided in NVML sinc
A long time in the works, 0.5.0 contains the last two years of my extremely sporadic work wrapping some of the new functionality provided in NVML since version 8 alongside a handful of small fixes and improvements.
nvml.lib) has been added that enables compilation using the MSVC toolchain on Windows.basic_usage example now prints the system's CUDA driver version.bitmasks
SW_THERMAL_SLOWDOWNHW_THERMAL_SLOWDOWNHW_POWER_BRAKE_SLOWDOWNDISPLAY_CLOCK_SETTINGdevice::FbcFlagsInitFlagsenums::device
SampleValue
I64(i64)from_tag_and_union constructor has been updated to support i64 valuesenum_wrappers::device
MemoryLocation
CbuSRAMTemperatureThreshold
MemoryMaxGpuMaxPerformancePolicy
BoardLimitLowUtilizationReliabilityTotalAppClocksTotalBaseClocksSampleValueType
SignedLongLongBrand
TitanEncoderType enumDetachGpuState enumPcieLinkState enumFbcSessionType enumDevice struct:
cuda_compute_capabilityencoder_capacityencoder_statsencoder_sessionsencoder_sessions_countfbc_statsfbc_sessions_infofbc_session_countprocess_utilization_statstotal_energy_consumptionfield_values_forset_gpu_locked_clocksreset_gpu_locked_clockserror
InsufficientMemoryVgpuEccNotSupportedNVML struct:
init_with_flagssys_cuda_driver_versionblacklist_device_countblacklist_device_infostructs::device
EncoderStatsCudaComputeCapabilityFieldIdRetiredPagestruct_wrappers
BlacklistDeviceInfostruct_wrappers::device
EncoderSessionInfoProcessUtilizationSampleFieldValueSampleFbcStatsFbcSessionInfolib.rs
cuda_driver_version_majorcuda_driver_version_minorbitmasks
ThrottleReasons::Unknown was removed since its counterpart in the NVML library was removedenum_wrappers::device
TopologyLevel
Cpu variant was replaced by the Node variantUnexpectedVariant error value is now an i32 (previously u32)Device.remove() method now takes additional parameters for more removal optionsDevice.fan_speed() method now takes a fan index to allow reading the speed of different fansDevice.retired_pages() method now returns the timestamps for each page's retirment along with their addressesNVML.sys_cuda_driver_version() method now errors if the CUDA shared library cannot be foundi8 vectors to be passed as cstrings now do so via the vec! macro rather than simply using with_capacity, meaning the length of the vector gets set appropriately
Drop impls, but it's nice to have fixed regardlesserror-chain: 0.11.x -> 0.12.xAlso 0.3.1 of the sys crate
Also 0.3.1 of the sys crate
The version was bumped in order to update the readme with the new information on Linux compilation. See the sys crates' changelog for details.
This is a small release that updates dependencies and makes a handful of changes for forward-compatibility purposes.
This is a small release that updates dependencies and makes a handful of changes for forward-compatibility purposes.
This release requires and supports Rust 1.20.0 or higher.
EventData::try_from() is replaced by a From<nvmlEventData_t> impl as it can no longer error
from_bits_truncate() usage described nextfrom_bits_truncate() constructor instead of from_bits()
*_strict() method counterparts are available for most such methods if you need thembitflags update, flags are now associated constants
nvml_wrapper::bitmasks::event::CLOCK_CHANGE is now nvml_wrapper::bitmasks::event::EventTypes::CLOCK_CHANGEbasic_usage example now uses pretty-bytes instead of number_prefix to pretty-print bytesbitflags: 0.9.x -> 1.0.xerror-chain: 0.10.x -> 0.11.xThe major highlight of this release is the high_level::event_loop module, an interface to NVML's event capabilities. Only available on Linux platforms
The major highlight of this release is the high_level::event_loop module, an interface to NVML's event capabilities. Only available on Linux platforms, this module provides you with the boilerplate necessary to quickly and easily watch for events on any number of devices, handling both errors and the events themselves. See the event_loop example in the examples folder at the root of the repository for more.
This release also marks the point at which no nightly features are required for any reason (meaning the removal of the nightly feature flag) and the addition of a couple examples demonstrating use of the crate.
This release requires and supports Rust 1.19.0 or higher.
Examples:
basic_usageevent_loopenums::event:
XidErrorhigh_level module
high_level::event_loop:
EventEventLoopEventLoopStateEventLoopProvider, implemented for:
NVMLnightly feature flag has been removed as nightly features are no longer required (union has been stabilized).The EventData.event_data field is now an Option<XidError> instead of a u64
None for most events) and also to statically type the Unknown value.The UnexpectedVariant error now contains the enum value that could not be mapped to an enum variant defined in the wrapper.
The project is now formatted via rustfmt as much as possible.
Markdown headers now have two newlines after them, which is (to my knowledge) how they are supposed to be formatted.
The major highlight of this release is the NvLink struct, an interface to NVML's various NvLink-related functions. This release additionally corrects
The major highlight of this release is the NvLink struct, an interface to NVML's various NvLink-related functions. This release additionally corrects some issues / oversights in the wrapper and replaces Rust enums with numerical constants for FFI use (see rust-lang/rust#36927).
This release requires and supports Rust 1.18.0 or higher.
NvLink struct added and fleshed out, wrapping all NvLink-related functions.
The NvLink struct can be obtained from a Device via Device.link_wrapper_for(). It provides a convenient interface to access the various NvLink-related functions with a common link value.
nvmlDeviceGetNvLinkStatenvmlDeviceGetNvLinkVersionnvmlDeviceGetNvLinkCapabilitynvmlDeviceGetNvLinkRemotePciInfonvmlDeviceGetNvLinkErrorCounternvmlDeviceResetNvLinkErrorCountersnvmlDeviceSetNvLinkUtilizationControlnvmlDeviceGetNvLinkUtilizationControlnvmlDeviceGetNvLinkUtilizationCounternvmlDeviceFreezeNvLinkUtilizationCounternvmlDeviceResetNvLinkUtilizationCounterDevice struct:
Device.link_wrapper_for()enums::nv_link:
Counterstruct_wrappers::nv_link:
UtilizationControlstructs::nv_link:
UtilizationCounterNo-run tests were added for all methods that modify state. They are useful to statically verify whatever is statically verifiable.
InsufficientSize error now contains an Option<usize> instead of a usize.
None to be returned rather than 0 in the default case, and Some(size) to be specified explicitly if possible.PciInfo's pci_sub_system_id field is now Option<u32> instead of u32.
NvLink.remote_pci_info(). NVIDIA says that the sub system ID is not set in that function call, and we represent that with None.PciInfo::try_from() now takes a boolean arg, sub_sys_id_present, which is used to specify whether the pci_sub_system_id field should be Some() or None.Methods that should have taken &mut self now do so, including:
Device.clear_cpu_affinity()Device.reset_applications_clocks()Device.clear_accounting_pids()Device.clear_ecc_error_counts()A method that should have taken &self now does:
NVML.are_devices_on_same_board()Numerical constants are now used in place of Rust enums for safety reasons
UnexpectedVariant error where they did not previouslybitflags: 0.8.x -> 0.9.xInitial release wrapping the majority of the NVML API surface.
Initial release wrapping the majority of the NVML API surface.
This release requires and supports Rust 1.17.0 or higher.
Your coding agent can read these notes before it upgrades. Set up the MCP server →