10 unstable releases (3 breaking)

0.3.0 Aug 28, 2022
0.2.0 Jul 15, 2022
0.1.0 May 22, 2022
0.0.9 May 9, 2022
0.0.6 Apr 25, 2022

#11 in #xdp

29 downloads per month
Used in bpf-feature


963 lines


A safe, flexible library for inspecting and querying eBPF objects.


It is based upon the work of libbpf-sys to safely create wrappers around libbpf. A lot of the design & inspiration stems from bpftool and libbpf-rs.

This crate is NOT meant to help with the writing and loading of eBPF programs and maps. For that, we highly recommend libbpf-rs and libbpf-cargo.

The goal of this library is to aid in eBPF clients interested in managing and monitoring their host's eBPF objects. As an example of this use case, check out bpf-feature.


crates.io badge crates.io badge crates.io badge

To use in your project, add into your Cargo.toml:

bpf-rs = "0.3.0"

or using cargo-edit:

$ cargo add bpf-rs


See documentation here


BSD 2-Clause - Maintained by bpfdeploy.io


~212K SLoC