#nvidia #gpu #monitoring #hardware #managment

nvml-wrapper-sys

Generated bindings to the NVIDIA Management Library

8 releases (4 breaking)

0.5.0 Dec 7, 2020
0.4.2 Jun 16, 2020
0.4.1 Sep 12, 2019
0.3.1 Apr 9, 2019
0.1.0 May 17, 2017

#436 in Hardware support

Download history 3089/week @ 2021-10-01 2079/week @ 2021-10-08 2193/week @ 2021-10-15 2441/week @ 2021-10-22 1761/week @ 2021-10-29 2619/week @ 2021-11-05 1778/week @ 2021-11-12 1550/week @ 2021-11-19 1455/week @ 2021-11-26 1961/week @ 2021-12-03 2530/week @ 2021-12-10 978/week @ 2021-12-17 990/week @ 2021-12-24 102/week @ 2021-12-31

1,194 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

305KB
9K SLoC

nvml-wrapper-sys

Crates.io version Crates.io downloads Docs.rs docs

Rust bindings for the NVIDIA Management Library (NVML), a C-based programmatic interface for monitoring and managing various states within NVIDIA GPUs.

It is intended to be a platform for building 3rd-party applications, and is also the underlying library for NVIDIA's nvidia-smi tool.

See nvml-wrapper for a safe wrapper over top of these bindings.

Type of Bindings

These bindings were created using bindgen's feature to generate wrappers over top of the functionality that the libloading crate provides. This means that they're designed for loading the NVML library at runtime; they are not suitable for linking to NVML (statically or dynamically) at buildtime.

This choice was made because NVML is the type of library that you'd realistically always want to load at runtime, for the following reasons:

  • NVIDIA doesn't distribute static versions of NVML, so it isn't possible to statically link it anyway
  • Linking to NVML at buildtime means the resulting binary can only be run on systems that have NVIDIA GPUs and well-formed NVIDIA driver installs

Loading NVML at runtime means it's possible to drop NVIDIA-related features at runtime on systems that don't have relevant hardware.

I would be willing to consider maintaining both types of bindings in this crate if there's a convincing reason to do so; please file an issue.

NVML Support

These bindings were generated for NVML version 11. Each new version of NVML is guaranteed to be backwards-compatible according to NVIDIA, so these bindings should be useful regardless of NVML version bumps.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~110KB