Crates.io | papi-sys |
lib.rs | papi-sys |
version | 0.1.1 |
source | src |
created_at | 2019-11-14 17:47:47.908796 |
updated_at | 2019-11-18 13:13:38.957873 |
description | PAPI (Performance API) bindings for Rust |
homepage | |
repository | https://github.com/LutzCle/papi-sys |
max_upload_size | |
id | 181298 |
size | 22,468 |
First, add the following to your Cargo.toml
:
[dependencies]
papi-sys = "0.1.0"
Before building, ensure that PAPI is installed on your system.
The purpose of this crate is to provide 1:1 bindings for papi.h. PAPI is a library that provides a consistent interface to hardware performance counters. Visit the PAPI website for more information.
Note that this crate does not provide a high-level interface to PAPI.
There are two environment variables to specify a custom PAPI library path:
PAPI_PREFIX
: required to generate bindings.rs
LD_LIBRARY_PATH
: required to dynamically link libpapi.so
Let's assume you installed PAPI in /opt/papi/5.7.0/
, then you can test by
$ PAPI_PREFIX=/opt/papi/5.7.0/ LD_LIBRARY_PATH=/opt/papi/5.7.0/lib:$LD_LIBRARY_PATH cargo test
To avoid setting LD_LIBRARY_PATH
, you can configure the search path
globally by running:
$ sudo echo "/opt/papi/5.7.0/" > /etc/ld.so.conf.d/papi.conf
$ sudo ldconfig
The following platforms are currently tested:
x86_64-unknown-linux-gnu
powerpc64le-unknown-linux-gnu
The following dependency versions are currently required:
rustc
>= 1.36gcc
>= 4.8 or clang
>= 3.8Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.