8 releases

0.4.0 Apr 12, 2024
0.3.5 Feb 27, 2024
0.3.4 Nov 27, 2023
0.3.2 Jul 24, 2023
0.1.0 May 9, 2023

#204 in Unix APIs

Download history 9/week @ 2024-02-03 30/week @ 2024-02-10 44/week @ 2024-02-17 276/week @ 2024-02-24 24/week @ 2024-03-02 140/week @ 2024-03-09 174/week @ 2024-03-16 23/week @ 2024-03-23 72/week @ 2024-03-30 30/week @ 2024-04-06 178/week @ 2024-04-13 11/week @ 2024-04-20 130/week @ 2024-05-11 108/week @ 2024-05-18

238 downloads per month
Used in 3 crates

MIT license

165KB
1.5K SLoC

EventHeader for Rust

Crates.io Documentation MIT licensed Build Status maintenance status

The eventheader crate provides a simple and efficient way to log EventHeader-encoded Tracepoints via the Linux user_events system. The events can be generated and collected on Linux 6.4 or later (requires the user_events kernel feature to be enabled, the tracefs or debugfs filesystem to be mounted, and appropriate permissions configured for the /sys/kernel/.../tracing/user_events_data file).

This crate uses macros to generate event metadata at compile-time, improving runtime performance and minimizing dependencies. To enable compile-time metadata generation, the event schema must be specified at compile-time. For example, event name and field names must be string literals, not variables.

In rare cases, you might not know what events you want to log until runtime. For example, you might be implementing a middle-layer library providing event support to a dynamic top-layer or a scripting language like JavaScript or Python. In these cases, you might use the eventheader_dynamic crate instead of this crate.

Dependencies