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

#191 in Unix APIs

Download history 50/week @ 2024-01-14 8/week @ 2024-01-21 14/week @ 2024-01-28 14/week @ 2024-02-04 29/week @ 2024-02-11 49/week @ 2024-02-18 279/week @ 2024-02-25 12/week @ 2024-03-03 174/week @ 2024-03-10 143/week @ 2024-03-17 20/week @ 2024-03-24 80/week @ 2024-03-31 167/week @ 2024-04-07 30/week @ 2024-04-14

300 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