NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4309 most downloaded on crates.io
Generated bindings to 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 14 of 14 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
14 releases · first in 2017
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.1Bindings have been 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).
Existing function signatures are preserved; new CUDA 13 structs, enums, and function pointers are added. Some public constants changed value with the new header (e.g. NVML_API_VERSION is now 13, NVML_BRAND_COUNT and NVML_GPM_METRIC_MAX grew), hence the minor version bump. Field IDs 251-273 retain v12 numbering so the wrapper's runtime remapping logic is unaffected.
One column per quarter.
Corrected NVML_FI_* field IDs 251-273 to match v12 numbering
NVML_FI_* field IDs 251-273 to match v12 numbering (#137)Release 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.
Bindings have been regenerated using the NVML 12.8.90 header and bindgen 0.68.1.
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 repoBindings have been regenerated using the NVML 12.2 header and bindgen 0.68.1.
2021The MSRV of this release is 1.60.0 (to match the wrapper crate).
Dynamically 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.xBindings have been regenerated using the NVML 11.8 header and bindgen 0.63.0.
legacy-functions feature can now be enabled to access older function versions in the bindings.The MSRV of this release continues to be 1.51.0.
Bump 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 dependencyBindings have been regenerated using the NVML 11.6 update 2 header and bindgen 0.59.2.
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 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.xThe NVML bindings have been regenerated using the new dynamic loading bindgen feature and for NVML 11. This means that this crate no longer needs to link to the NVML library at buildtime.
These bindings form a thin wrapper over the libloading crate.
nvml.lib import library has been removed from the crate as it is no longer needed now that NVML is loaded dynamically at runtime on Windowslibloading: new dependency on 0.6.6The crate was updated to Rust 2018 edition.
The crate was updated to Rust 2018 edition.
Also 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.
The Windows import library has been regenerated for NVML 10.1.
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.xBindings have been regenerated using the NVML 10.1 header and bindgen 0.50.0.
Improvements were made to the build script:
Improvements were made to the build script:
libnvidia-ml.so and it will be automatically added to the locations that the library is being searched for in. Thanks @SunDoge!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
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 nightly feature flag has been removed as unions are now available on stable Rust.
This release requires and supports Rust 1.19.0 or higher.
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.xRust enums were removed in favor of numerical constants for C enums. This was done for safety reasons; see rust-lang/rust#36927 for more information.
enums replaced with numerical constants::std::os::raw::x paths with raw::x paths for readabilityCopy and Clone from structs where they did not make sense
Initial 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.
Initial release providing bindings for the entirety of the NVML API as well as nightly-only feature usage behind a feature flag.
Your coding agent can read these notes before it upgrades. Set up the MCP server →