btf/lib.rs
1//! [](https://github.com/arcjustin/btf/actions?query=workflow%3Abuild)
2//! [](https://crates.io/crates/btf)
3//! [](https://docs.rs/btf/)
4//! [](https://tokei.rs/b1/github/arcjustin/btf?category=code)
5//!
6//! Parsing library for the eBPF type format.
7//!
8//! ## Usage
9//!
10//! ```
11//! use btf::Btf;
12//!
13//! let btf = Btf::from_file("/sys/kernel/btf/vmlinux").expect("Failed to parse vmlinux");
14//! let pt_regs = btf.get_type_by_name("pt_regs").expect("Can't find type.");
15//! println!("{:?}", pt_regs);
16//! ```
17//!
18//! ## License
19//!
20//! * [MIT license](http://opensource.org/licenses/MIT)
21pub mod btf;
22pub mod error;
23
24pub use crate::btf::*;
25pub use crate::error::*;