nvml-wrapper
A safe and ergonomic Rust wrapper for the NVIDIA Management Library
0.12.1
5.5M downloads/mo
#4348 most downloaded on crates.io
Cldfire/nvml-wrapper
What this package is like to depend on
Last release 4 months ago
30 Mar 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
2 releases in the last 12 months
see the full history below
Release timeline
14 releases · May 2017 to Mar 2026Releases
latest 14-
0.12.130 Mar 2026Release notes
Open source →Fixed
- 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, #137) - Added runtime driver version detection and transparent field ID remapping for drivers >= 580.82 (CUDA 13.0 Update 1+) so callers don't need to handle the v12/v13U1 numbering difference (#137)
- Fixed APIs that need double-calls for buffer size calculation (#129)
- Fixed
nvmlDeviceGetActiveVgpusargument ordering (#128)
Added
FieldIdSchemeenum andNvml::field_id_scheme()to inspect the detected driver's field ID numbering- Method for getting vGPU type ID (#124)
- Corrected
-
0.12.012 Feb 2026Release notes
Open source →Added
- Add idiomatic abstraction for vGPU type information (#68)
- Add device::mig_device_by_index() (#93)
- Add device::mig_device_count() (#94)
- Add device::vgpu_scheduler_capabilities() (#95)
- Add device::mig_parent_device() (#96)
- Add device::vgpu_host_mode() (#98)
- Add device::mig_is_mig_device_handle() (#99)
- Add device::set_mig_mode() (#100)
- Add vGPU capabilities support (#101)
- Add device::possible_placements() (#102)
- Add NvLink bandwidth mode API (#103)
- Add NvLink::remote_device_type() (#106)
- Add device::set_temperature_threshold() (#107)
- Add Nvml::vgpu_version() and Nvml::set_vgpu_version() (#108)
- Add device::vgpu_accounting_pids() and device::vgpu_accounting_stats() (#109)
- Add device::vgpu_scheduler_log() (#110)
- Add device::vgpu_scheduler_state() and device::set_vgpu_scheduler_state() (#111)
- Add MPS version of running_compute_processes for >= Volta (#112)
- Add device::gsp_firmware_mode() and device::gsp_firmware_version() (#113)
- Add device::profile_info() (#115)
- Implement
From<NvmlError>fornvmlReturn_tconversion (#117) - Add device::numa_node_id() for NUMA-node-friendly GPUs (#118)
- Add missing AcousticThreshold enum variants (#121)
- Add GPU Performance Monitoring (GPM) support (#122)
Fixed
- Only return samples that are actually valid (#67)
- Fix get cc macros (#104)
- Fix attestation report size (#116)
- Fix spelling mistake of "occurred" (#120)
Internal
What's Changed
- Provide idiomatic abstraction for vGPU type information by @christoph-heiss in #68
- adding device::mig_device_by_index(). by @devnexen in #93
- adding device::mig_device_count() by @devnexen in #94
- Adding device::vgpu_scheduler_capabilities() by @devnexen in #95
- adding device::mig_parent_device() by @devnexen in #96
- adding device::mig_is_mig_device_handle() by @devnexen in #99
- adding device::vgpu_host_mode() by @devnexen in #98
- adding vGPU capabilities support. by @devnexen in #101
- adding device::set_mig_mode() by @devnexen in #100
- adding device::possible_placements() by @devnexen in #102
- Fix get cc macros by @dcmiddle in #104
- adding bandwidth mode api for NvLink. by @devnexen in #103
- Address cargo clippy warnings by @thinkingfish in #105
- adding NvLink::remote_device_type from a link index attached to a dev… by @devnexen in #106
- adding device::set_temperature_threshold for a given type and C. temp. by @devnexen in #107
- adding Nvml::vgpu_version() and Nvml::set_vgpu_version(). by @devnexen in #108
- Vgpu instance pids by @devnexen in #109
- adding device::vgpu_scheduler_log() to fetch n scheduler entries log by @devnexen in #110
- adding device::vgpu_scheduler_state/set_vgpu_scheduler_state by @devnexen in #111
- adding device::numa_node_id() for NUMA node friendly GPUs. by @devnexen in #118
- adding device::profile_info() by @devnexen in #115
- adding the MPS version of running_compute_processes for >= Volta. by @devnexen in #112
- device: fix attestation report size by @fitzthum in #116
- feat(error): implement From for nvmlReturn_t conversion by @fslongjin in #117
- samples: Only return samples that are actually valid. by @umanwizard in #67
- adding device::gsp_firmware_mode/gsp_firmware_version() by @devnexen in #113
- Fix lifetime warnings by @swlynch99 in #119
- Fix spelling mistake of occurred by @bdrung in #120
- Add missing TemperatureThreshold enum variants by @ilya-zlobintsev in #121
- feat: add GPU Performance Monitoring (GPM) by @brayniac in #122
- release: v0.12.0 by @brayniac in #123
New Contributors
- @christoph-heiss made their first contribution in #68
- @dcmiddle made their first contribution in #104
- @thinkingfish made their first contribution in #105
- @fitzthum made their first contribution in #116
- @fslongjin made their first contribution in #117
- @umanwizard made their first contribution in #67
- @swlynch99 made their first contribution in #119
- @bdrung made their first contribution in #120
Full Changelog: v0.11.0...v0.12.0
Release notes
Open source →Added
- Add idiomatic abstraction for vGPU type information (#68)
- Add device::mig_device_by_index() (#93)
- Add device::mig_device_count() (#94)
- Add device::vgpu_scheduler_capabilities() (#95)
- Add device::mig_parent_device() (#96)
- Add device::vgpu_host_mode() (#98)
- Add device::mig_is_mig_device_handle() (#99)
- Add device::set_mig_mode() (#100)
- Add vGPU capabilities support (#101)
- Add device::possible_placements() (#102)
- Add NvLink bandwidth mode API (#103)
- Add NvLink::remote_device_type() (#106)
- Add device::set_temperature_threshold() (#107)
- Add Nvml::vgpu_version() and Nvml::set_vgpu_version() (#108)
- Add device::vgpu_accounting_pids() and device::vgpu_accounting_stats() (#109)
- Add device::vgpu_scheduler_log() (#110)
- Add device::vgpu_scheduler_state() and device::set_vgpu_scheduler_state() (#111)
- Add MPS version of running_compute_processes for >= Volta (#112)
- Add device::gsp_firmware_mode() and device::gsp_firmware_version() (#113)
- Add device::profile_info() (#115)
- Implement
From<NvmlError>fornvmlReturn_tconversion (#117) - Add device::numa_node_id() for NUMA-node-friendly GPUs (#118)
- Add missing AcousticThreshold enum variants (#121)
- Add GPU Performance Monitoring (GPM) support (#122)
Fixed
- Only return samples that are actually valid (#67)
- Fix get cc macros (#104)
- Fix attestation report size (#116)
- Fix spelling mistake of "occurred" (#120)
Internal
- Address cargo clippy warnings (#105)
- Fix lifetime warnings (#119)
-
0.11.028 May 2025Release notes
Open source →And nvml-wrapper-sys 0.9.0
Fixes, improvements, and updates for NVML 12.8.90.
Fixed
- Include license text in the packaged crates (#66)
- Fix EventLoop elided lifetime warnings (#69)
- Use proper api version from header. (#80)
Added
- Add Gpc and Mem clock offset methods (#61)
- Add nvmlDeviceGetP2PStatus (#62)
- Add Blackwell to DeviceArchitecture enum (#70)
- Add DeviceAttributes and device::attributes(). (#71)
- Add attestation report fetch functionality to device (#73)
- Add confidential compute gpu certificate functionality (#74)
- Add checks for confidential compute (#76)
- Add fan control functions (#77)
- Add device::cpu_affinity_within_scope. (#79)
- Add FanSpeedInfo and FanSpeedRPM wrappers. (#80)
- Add device::memory_affinity(). (#82)
- Add device::mig_mode(). (#83)
- Add wrappers for clock offset and pstate functions, min_max_fan_speed (#85)
- Add device::virtualization_mode() wrapper. (#86)
- Add vgpu_driver_capabilities() (#87)
- Add device::performance_modes() (#88)
- Add device::active_vgpus() (#89)
- Add util functions for cc and multi-gpu ppcie (#90)
- Add set fan control policy function (#91)
- Add last_seen_timestamp parameter to get more accurate process utilization counts. (#92)
Changed
Release notes
Open source →Fixes, improvements, and updates for NVML 12.8.90.
Fixed
- Include license text in the packaged crates (#66)
- Fix EventLoop elided lifetime warnings (#69)
- Use proper api version from header. (#80)
Added
- Add Gpc and Mem clock offset methods (#61)
- Add nvmlDeviceGetP2PStatus (#62)
- Add Blackwell to DeviceArchitecture enum (#70)
- Add DeviceAttributes and device::attributes(). (#71)
- Add attestation report fetch functionality to device (#73)
- Add confidential compute gpu certificate functionality (#74)
- Add checks for confidential compute (#76)
- Add fan control functions (#77)
- Add device::cpu_affinity_within_scope. (#79)
- Add FanSpeedInfo and FanSpeedRPM wrappers. (#80)
- Add device::memory_affinity(). (#82)
- Add device::mig_mode(). (#83)
- Add wrappers for clock offset and pstate functions, min_max_fan_speed (#85)
- Add device::virtualization_mode() wrapper. (#86)
- Add vgpu_driver_capabilities() (#87)
- Add device::performance_modes() (#88)
- Add device::active_vgpus() (#89)
- Add util functions for cc and multi-gpu ppcie (#90)
- Add set fan control policy function (#91)
- Add last_seen_timestamp parameter to get more accurate process utilization counts. (#92)
Changed
- Update nvmlDeviceGetMemoryInfo to version 2 to be consistent with nvidia-smi (#58)
- Set LIB_PATH to libnvidia-ml.so.1 instead of libnvidia-ml.so on Linux (#63)
-
0.10.010 Feb 2024Release notes
Open source →Updates for NVML 12.2.
Added
Device- Methods
pcie_link_speed()
- Methods
DeviceArchitecture- Variants
AdaHopper
- Variants
Changed
enums::devicePcieLinkMaxSpeed- Renamed variants to reflect the fact that they appear to represent per-lane transfers/second, not multi-lane throughput
Internal
- Bumped MSRV to 1.60.0 for usage of namespaced features
- Bumped crate edition to
2021 - Removed
rust-hookfrom development workflow - Started building crate in CI on
macos-latest - Added a script to find unwrapped function names
- Vendored header files are now excluded from repo stats
Rust Version Support
The MSRV of this release is 1.60.0. This is for usage of namespaced features.
Dependencies
bitflags:1.3->2.4.0libloading:0.7.0->0.8.1wrapcenum-derive:0.4.0->0.4.1
-
0.9.021 Jan 2023Release notes
Open source →-
Release 0.9.0
And 0.7.0 ofnvml-wrapper-sys -
Downgrade
indexmap
In order to downgradehashbrownto avoid requiring Rust 2021 edition
Release notes
Open source →Release Summary
Bug fixes, improvements, and updates for NVML 11.8.
Added
- Wrapper methods are now annotated with the
#[doc(alias = "...")]attribute to make them searchable by C function name in rustdoc (#31 - @arpankapoor) - Some older function versions are now wrapped and available for use behind the
legacy-functionscrate featurerunning_compute_processes_v2running_graphics_processes_v2
Changed
enum_wrappers::deviceBrand- Added new variants (#35 - @nemosupremo)
Fixed
Devicerunning_compute_processes()- Fixed count handling (#36 - @jjyyxx)
- This bug would have caused five blank process information structs to be returned in addition to actual process information if there were any running compute processes.
- Fixed count handling (#36 - @jjyyxx)
Internal
- SPDX expressions in
Cargo.tomlfiles have been updated to avoid using the now-deprecated slash syntax (#32 - @KisaragiEffective)
Rust Version Support
The MSRV of this release continues to be 1.51.0.
-
-
0.8.027 May 2022Release notes
Open source →Release Summary
Updates for the latest version of NVML (11.6 update 2). More wrapped methods!
Added
Device:- Methods:
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_num
- Methods:
Changed
- The
NVMLstruct has been renamed toNvml(#22 - @TheJltres) - The
basic_usageexample now prints your device's architecture and number of CUDA cores - Some methods on
Nvmlhave been renamed:Nvml::blacklist_device_count()->Nvml::excluded_device_count()Nvml::blacklist_device_info()->Nvml::excluded_device_info()
- Some struct wrappers have been modified:
BlacklistDeviceInforenamed toExcludedDeviceInfoProcessInfogained new fields:gpu_instance_idcompute_instance_id
Device:Device::name()now creates a buffer sized to the newNVML_DEVICE_NAME_V2_BUFFER_SIZEconstantDevice::running_compute_processes()andDevice::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 inGpuLockedClocksSettingallowing for both numeric ranges and symbolic boundaries
Rust Version Support
The MSRV of this release is 1.51.0. This is needed for const generics and the ability to implement
Debugfor arrays of any size.Dependencies
libloading:0.6.6->0.7.0
Internal
- Re-organized repo using a workspace
- Tests that can't be run on my machine are now ignored with the
#[ignore]attribute. Thetest-localfeature has been removed as a result - The
Cargo.lockfile is now committed to the repo
-
0.7.007 Dec 2020Release notes
Open source →Release Summary
Dynamically loading the NVML library at runtime is here! Thanks to a new bindgen feature that landed recently,
nvml-wrapper-sysnow has regenerated bindings that make use of thelibloadingcrate 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.
Rust Version Support
The MSRV of this release is 1.42.0.
Added
NVMLstruct:- Added methods:
builder
- Added methods:
NvmlBuilderstruct- A builder struct that provides further flexibility in how NVML is initialized
bitmasks- Added events:
POWER_SOURCE_CHANGEMIG_CONFIG_CHANGE
- Added init flags:
NO_ATTACH
- Added events:
Devicestruct:- Added methods:
new(replaces theFrom<nvmlDevice_t>impl)nvml
- Added methods:
EventSetstruct:- Added methods:
new(replaces theFrom<nvmlEventSet_t>impl)
- Added methods:
EventDatastruct:- Added methods:
new(replaces theFrom<nvmlEventData_t>impl)
- Added methods:
Unitstruct:- Added methods:
new(replaces theFrom<nvmlUnit_t>impl)nvml
- Added methods:
NvmlError- Added variants:
LibloadingErrorFailedToLoadSymbol
- Added variants:
Changed
InitFlagsnow implementsDefaultNvmlErrorandNvmlErrorWithSourceno longer implementClone,Eq, orPartialEq- They can no longer implement these traits because
libloading::Errordoesn't implement them - As a result of this change,
FieldValueSampleno longer implementsCloneorPartialEq
- They can no longer implement these traits because
NvmlError::UnexpectedVariantnow contains au32instead of ani32due to a change in the types of the generated bindings
Dependencies
libloading: new dependency on0.6.6static_assertions: new dependency on1.1.x
-
0.6.016 Jun 2020Release notes
Open source →Release Summary
This release was focused on cleanup and migrating a crate originally written in 2016 to modern Rust conventions. Notably,
error-chainhas been ripped out of the crate entirely and replaced with an error enum that implementsstd::error::Error.Additionally, the
wrapcenum-derivedependency (a derive macro used to simplify API generation internally) has been completely re-written and now depends on the1.0releases ofsynandquote. There are no user-facing changes as a result of this rewrite, but your crate's dependency tree will likely be very pleased.Rust Version Support
The MSRV of this release is 1.42.0.
Changes
nvml-wrapperupdated to Rust 2018 editionnvml-wrapper-sysupdated to Rust 2018 editionwrapcenum-derivehas been re-written and now depends on modern versions ofsynandquote- Removed
#[inline]attribute from all functions - Merged methods to get raw handles from structs into a single method
Device.handle(),EventSet.handle(),Unit.handle()
- Ripped
error-chainout of crate entirely- Replaced with
NvmlErrorenum that implementsstd::error::Error
- Replaced with
- Migrated most
try_from()methods to implementations ofstd::convert::TryFrom - Migrated all
try_into_c()methods to implementations ofstd::convert::TryInto - Modernized some of the example code
Dependencies
bitflags:1.0.x -> 1.2.xthiserror: new dependency on1.0.xerror-chain: no longer a dependency
-
0.5.011 Sep 2019Release notes
Open source →Release Summary
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.
Additions
- An import library (
nvml.lib) has been added that enables compilation using the MSVC toolchain on Windows. - The
basic_usageexample now prints the system's CUDA driver version. bitmasks- Added throttle reasons:
SW_THERMAL_SLOWDOWNHW_THERMAL_SLOWDOWNHW_POWER_BRAKE_SLOWDOWNDISPLAY_CLOCK_SETTING
- Added
device::FbcFlags - Added
InitFlags
- Added throttle reasons:
enums::deviceSampleValue- Added variant
I64(i64) - The
from_tag_and_unionconstructor has been updated to supporti64values
- Added variant
enum_wrappers::deviceMemoryLocation- Added variants:
CbuSRAM
- Added variants:
TemperatureThreshold- Added variants:
MemoryMaxGpuMax
- Added variants:
PerformancePolicy- Added variants:
BoardLimitLowUtilizationReliabilityTotalAppClocksTotalBaseClocks
- Added variants:
SampleValueType- Added variant
SignedLongLong
- Added variant
Brand- Added variant
Titan
- Added variant
- Added the
EncoderTypeenum - Added the
DetachGpuStateenum - Added the
PcieLinkStateenum - Added the
FbcSessionTypeenum
Devicestruct:- Added methods:
cuda_compute_capabilityencoder_capacityencoder_statsencoder_sessionsencoder_sessions_countfbc_statsfbc_sessions_infofbc_session_countprocess_utilization_statstotal_energy_consumptionfield_values_forset_gpu_locked_clocksreset_gpu_locked_clocks
- Added methods:
error- Added errors:
InsufficientMemoryVgpuEccNotSupported
- Added errors:
NVMLstruct:- Added methods:
init_with_flagssys_cuda_driver_versionblacklist_device_countblacklist_device_info
- Added methods:
structs::device- Added structs:
EncoderStatsCudaComputeCapabilityFieldIdRetiredPage
- Added structs:
struct_wrappers- Added struct:
BlacklistDeviceInfo
- Added struct:
struct_wrappers::device- Added structs:
EncoderSessionInfoProcessUtilizationSampleFieldValueSampleFbcStatsFbcSessionInfo
- Added structs:
lib.rs- Added functions:
cuda_driver_version_majorcuda_driver_version_minor
- Added functions:
Removals
bitmasksThrottleReasons::Unknownwas removed since its counterpart in the NVML library was removed
Changes
enum_wrappers::deviceTopologyLevel- The
Cpuvariant was replaced by theNodevariant
- The
- The
UnexpectedVarianterror value is now ani32(previouslyu32) - The
Device.remove()method now takes additional parameters for more removal options - The
Device.fan_speed()method now takes a fan index to allow reading the speed of different fans - The
Device.retired_pages()method now returns the timestamps for each page's retirment along with their addresses - The
NVML.sys_cuda_driver_version()method now errors if the CUDA shared library cannot be found
Fixes
- Methods that allocate
i8vectors to be passed as cstrings now do so via thevec!macro rather than simply usingwith_capacity, meaning the length of the vector gets set appropriately- This did not cause a memory leak because we were just working with primitive types that don't have
Dropimpls, but it's nice to have fixed regardless
- This did not cause a memory leak because we were just working with primitive types that don't have
Dependencies
error-chain:0.11.x -> 0.12.x
- An import library (
-
0.4.109 Apr 2019Release notes
Open source →Release Summary
The version was bumped in order to update the readme with the new information on Linux compilation. See the
syscrates' changelog for details.Fixes
- Attempting to compile the library on macOS will now result in an informative error
-
0.4.028 Sep 2017Release notes
Open source →Release Summary
This is a small release that updates dependencies and makes a handful of changes for forward-compatibility purposes.
Rust Version Support
This release requires and supports Rust 1.20.0 or higher.
Additions
- CI has been set up
- All it can do is build the crate (no testing of any kind), but at least it's something.
Changes
EventData::try_from()is replaced by aFrom<nvmlEventData_t>impl as it can no longer error- This is because of the
from_bits_truncate()usage described next
- This is because of the
- Methods that deal with bitmasks now use the
from_bits_truncate()constructor instead offrom_bits()- This allows the wrapper, which is using bindings for NVML 8, to still accept bitmasks from future versions of NVML (such as NVML 9) that may have additional flags
*_strict()method counterparts are available for most such methods if you need them
- As a result of the
bitflagsupdate, flags are now associated constants- This means that, for instance,
nvml_wrapper::bitmasks::event::CLOCK_CHANGEis nownvml_wrapper::bitmasks::event::EventTypes::CLOCK_CHANGE
- This means that, for instance,
- Imports were deglobbed in a number of places
- The
basic_usageexample now usespretty-bytesinstead ofnumber_prefixto pretty-print bytes
Dependencies
bitflags:0.9.x -> 1.0.xerror-chain:0.10.x -> 0.11.x
- CI has been set up
-
0.3.020 Jul 2017Release notes
Open source →Release Summary
The major highlight of this release is the
high_level::event_loopmodule, 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 theevent_loopexample 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
nightlyfeature flag) and the addition of a couple examples demonstrating use of the crate.Rust Version Support
This release requires and supports Rust 1.19.0 or higher.
Additions
-
Examples:
basic_usageevent_loop
-
enums::event:- New file with the following:
XidError
- New file with the following:
-
high_levelmodule- This module will be the home of any high-level abstractions over the NVML API.
high_level::event_loop:- New file with the following:
EventEventLoopEventLoopStateEventLoopProvider, implemented for:NVML
- New file with the following:
Removals
- The
nightlyfeature flag has been removed as nightly features are no longer required (unionhas been stabilized).
Changes
-
The
EventData.event_datafield is now anOption<XidError>instead of au64- This was done to more strongly represent the field's presence via the type system (it is
Nonefor most events) and also to statically type theUnknownvalue.
- This was done to more strongly represent the field's presence via the type system (it is
-
The
UnexpectedVarianterror 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.
-
-
0.2.008 Jun 2017Release notes
Open source →Release Summary
The major highlight of this release is the
NvLinkstruct, an interface to NVML's various NvLink-related functions. This release additionally corrects some issues / oversights in the wrapper and replaces Rustenums with numerical constants for FFI use (see rust-lang/rust#36927).Rust Version Support
This release requires and supports Rust 1.18.0 or higher.
Additions
-
NvLinkstruct added and fleshed out, wrapping all NvLink-related functions.The
NvLinkstruct can be obtained from aDeviceviaDevice.link_wrapper_for(). It provides a convenient interface to access the various NvLink-related functions with a commonlinkvalue.- Functions wrapped:
nvmlDeviceGetNvLinkStatenvmlDeviceGetNvLinkVersionnvmlDeviceGetNvLinkCapabilitynvmlDeviceGetNvLinkRemotePciInfonvmlDeviceGetNvLinkErrorCounternvmlDeviceResetNvLinkErrorCountersnvmlDeviceSetNvLinkUtilizationControlnvmlDeviceGetNvLinkUtilizationControlnvmlDeviceGetNvLinkUtilizationCounternvmlDeviceFreezeNvLinkUtilizationCounternvmlDeviceResetNvLinkUtilizationCounter
- Tests written for all new functionality
- While I cannot personally run these, they are useful both for static analysis and for those who are able to run the tests.
- Functions wrapped:
-
Devicestruct:Device.link_wrapper_for()
-
enums::nv_link:- New file with the following:
Counter
- New file with the following:
-
struct_wrappers::nv_link:- New file with the following:
UtilizationControl
- New file with the following:
-
structs::nv_link:- New file with the following:
UtilizationCounter
- New file with the following:
-
No-run tests were added for all methods that modify state. They are useful to statically verify whatever is statically verifiable.
Changes
InsufficientSizeerror now contains anOption<usize>instead of ausize.- This allows for
Noneto be returned rather than0in the default case, andSome(size)to be specified explicitly if possible.
- This allows for
PciInfo'spci_sub_system_idfield is nowOption<u32>instead ofu32.- This change was made in order to accommodate
NvLink.remote_pci_info(). NVIDIA says that the sub system ID is not set in that function call, and we represent that withNone. - As a direct result of this change,
PciInfo::try_from()now takes a boolean arg,sub_sys_id_present, which is used to specify whether thepci_sub_system_idfield should beSome()orNone.
- This change was made in order to accommodate
Fixes
-
Methods that should have taken
&mut selfnow 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
&selfnow does:NVML.are_devices_on_same_board()
-
Numerical constants are now used in place of Rust
enums for safety reasons- For more info see rust-lang/rust#36927
- Many methods now return an
UnexpectedVarianterror where they did not previously
Dependencies
bitflags:0.8.x -> 0.9.x
-
-
0.1.017 May 2017Release notes
Open source →Release Summary
Initial release wrapping the majority of the NVML API surface.
Rust Version Support
This release requires and supports Rust 1.17.0 or higher.