Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

PAPI bindings for Rust generated with Bindgen

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

LutzCle/papi-sys

Repository files navigation

Usage

First, add the following to yourCargo.toml:

[dependencies]papi-sys ="0.1.0"

Before building, ensure that PAPI is installed on your system.

What is papi-sys?

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 performancecounters. Visit thePAPI website for more information.

Note that this crate does not provide a high-level interface to PAPI.

Environment Variables

There are two environment variables to specify a custom PAPI library path:

  • PAPI_PREFIX: required to generatebindings.rs
  • LD_LIBRARY_PATH: required to dynamically linklibpapi.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 cargotest

To avoid settingLD_LIBRARY_PATH, you can configure the search pathglobally by running:

$ sudoecho"/opt/papi/5.7.0/"> /etc/ld.so.conf.d/papi.conf$ sudo ldconfig

Platforms

The following platforms are currently tested:

  • x86_64-unknown-linux-gnu
  • powerpc64le-unknown-linux-gnu

Dependencies

The following dependency versions are currently required:

  • rustc >= 1.36
  • gcc >= 4.8 orclang >= 3.8

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submittedfor inclusion in the work by you, as defined in the Apache-2.0 license, shall bedual licensed as above, without any additional terms or conditions.

About

PAPI bindings for Rust generated with Bindgen

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp