$ account libbpf
libbpf-rs is a Rust workspace providing safe, idiomatic bindings to the Linux libbpf C library for eBPF program development. It consists of two main crates: `libbpf-rs`, a high-level runtime library for loading, attaching, and managing eBPF programs and maps, and `libbpf-cargo`, a Cargo plugin that compiles eBPF C source files and generates Rust skeleton code with type-safe accessors and lifecycle management. The library supports a wide range of eBPF attachment types (kprobes, tracepoints, XDP, TC, netfilter, etc.), CO-RE (Compile-Once-Run-Everywhere) via BTF, and includes utilities like ring buffer and perf buffer helpers, a query interface for inspecting loaded kernel objects, and a linker for combining multiple BPF objects. Architecture is a workspace with library crates and numerous example applications (e.g., runqslower, tcp_ca, tproxy) demonstrating real-world usage. Entry points include `ObjectBuilder`, `SkeletonBuilder` (from libbpf-cargo), and generated skeleton APIs. The project relies on `libbpf-sys` for FFI, and examples use `clap` for CLI and `plain` for safe byte conversion. It is heavily tested with integration tests requiring root privileges.