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 |
#236 in Unix APIs
95 downloads per month
Used in 4 crates
165KB
1.5K
SLoC
EventHeader for Rust
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.