8 releases

0.5.0 Dec 4, 2025
0.4.0 Oct 23, 2023
0.3.5 Oct 5, 2023
0.3.4 Jul 28, 2023
0.3.1 Apr 12, 2022

#289 in Profiling

Download history 41818/week @ 2025-09-22 74605/week @ 2025-09-29 82244/week @ 2025-10-06 71260/week @ 2025-10-13 75385/week @ 2025-10-20 65115/week @ 2025-10-27 76244/week @ 2025-11-03 73006/week @ 2025-11-10 79692/week @ 2025-11-17 78122/week @ 2025-11-24 85199/week @ 2025-12-01 93847/week @ 2025-12-08 95307/week @ 2025-12-15 66883/week @ 2025-12-22 63768/week @ 2025-12-29 107931/week @ 2026-01-05

339,873 downloads per month
Used in 278 crates (via ittapi)

GPL-2.0-only OR BSD-3-Clause

1MB
21K SLoC

Rust 14K SLoC // 0.0% comments C 2K SLoC // 0.0% comments Python 2K SLoC // 0.2% comments GNU Style Assembly 1.5K SLoC // 0.0% comments C++ 1K SLoC // 0.1% comments Assembly 266 SLoC // 0.1% comments

ittapi-sys

Build Status Documentation Status

This crate contains low-level Rust bindings for the C ittapi library--you likely want to use the high-level Rust crate. The ittapi library is used for various aspects of Intel® profiling; it exposes the Instrumentation and Tracing Technology (ITT) API as well as the Just-In-Time (JIT) Profiling API. More details about ittapi are available on its README.

IMPORTANT NOTE: this crate is currently only tested on Linux, macOS, and Windows platforms but support for other platforms is intended; contributions are welcome! FreeBSD and OpenBSD are supported but untested.

If you are interested in using VTune to profile Rust applications, you may find the following guide helpful: Wasmtime Docs: Using VTune on Linux

Use

[dependencies]
ittapi-sys = "*"

Using the symbols in this crate can be tricky: ittapi consists of a static part (e.g., libittnotify.a) linked in this crate and a dynamic part (e.g., libittnotify_collector.so, VTune Profiler). The static part provides the ITT data symbols that may be subsequently resolved to actual implementations in the dynamic part--the data collector. This crate only provides symbols like __itt_task_begin_ptr__3_0, not __itt_task_begin, to avoid link errors; programs using ittapi should compile even if the dynamic part is not present. Using the high-level Rust crate avoids this complexity.

Build

cargo build

Building ittapi-sys will build the ittapi C library and link it statically into your application; see the build.rs file.

For Windows developers: this crate uses a symbolic link to access the C library it depends on. To modify this crate on Windows, either configure Git to understand POSIX symlinks or use the copy-c-library.ps1 script to temporarily copy the files.

Test

cargo test

This crate's tests ensure the ittapi-sys bindings remain up to date with the official C header files; they do not check ittapi functionality.

Regenerate Bindings

If the ittapi-sys bindings are not up to date, they can be regenerated with:

BLESS=1 cargo test

The binding generation uses bindgen. An in-depth description of how to use bindgen is available in the bindgen documentation.

No runtime deps