Skip to content

lemonrock/nvml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvml

nvml is a rust crate providing mid-level bindings for PMDK, the persistent memory libraries (formerly NVML) using the nvml-sys FFI bindings.

It currently requires rust nightly to compile.

Building for the Intel Ivy Bridge CPU

nvml has optimizations to use Intel's RDRAND instructions (confusingly known as rdrnd to LLVM). To build with them, from the root of the source repository do once:-

rustup component add rust-src
cargo install xargo

Then, for each build, from the root of the source repository do:-

(cd workspace/nvml; RUST_TARGET_PATH="$(pwd)" xargo build --target x86_64-apple-darwin-ivybridge)

Gotchas

  • Sadly, there's a bug somewhere in the combination of xargo, cargo and rustc, such that the CARGO_TARGET_DIR='target' setting is not honoured after compiling the sysroot. This means that a .cargo/config file must not change the target directory.
  • Also, there's a bug in rustc such that RUSTFLAGS='-C target-feature=rdrnd' will cause #[cfg(target_feature = "rdrnd")]" to not work.

Licensing

The license for this project is MIT.

About

Rust crate with mid-level bindings for NVML / PMEM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published