Releases: libbpf/libbpf-rs
Releases · libbpf/libbpf-rs
v0.21.2
What's Changed
libbpf-rs
- Enabled key iteration on
MapHandleobjects (formerly possible only onMapobjects) - Bumped minimum Rust version to
1.64
libbpf-cargo
- Added
Defaultimpl for generatedstructtypes containing pointers - Fixed handling of function prototype type declaration inference in BTF and skeleton generation
- Improved error reporting in build script usage
- Bumped minimum Rust version to
1.64
Full Changelog: v0.21.1...v0.21.2
v0.21.1
What's Changed
libbpf-rs
- Fixed build failures on 32 bit x86 and aarch32
libbpf-cargo
- Adjusted named padding members in generated types to have
pubvisibility
Full Changelog: v0.21.0...v0.21.1
v0.21.0
What's Changed
libbpf-rs
- Added
TcHook::get_handleandTcHook::get_prioritymethods for restoring TcHook object - Added
Program::get_fd_by_idandProgram::get_id_by_fdmethods for restoring bpf management data - Added
Map::is_pinnedandMap::get_pin_pathmethods for getting map pin status - Added
Program::attach_iterfor attaching of programs to an iterator - Added
Map::delete_batchmethod for bulk deletion of elements - Added read/update/delete support for queue and stack
Maptypes - Added a new
MapHandlewhich provides most functionality previously found inMap - Removed support for creating
Mapobjects standalone (i.e. maps not created by libbpf) - Removed various
<object-type>::fd()methods in favor of<object-type>::as_fd() - Improved
btf_type_match!macro, adding support for most of Rust'smatchcapabilities - Added
skelmodule exposing skeleton related traits - Fixed issue where instances of
Mapcreated or opened without going throughObjectwould leak file descriptors - Fixed potential Uprobe attachment failures on optimized builds caused by improper
libbpf_sys::bpf_object_open_optsobject initialization - Adjusted various methods to work with
BorrowedFdinstead of raw file descriptors - Made
RingBufferBuilder::addenforce thatselfcannot outlive the maps passed into it - Adjusted
Error::Systemvariant textual representation to includeerrnostring
libbpf-cargo
- Adjusted skeleton generation code to ensure implementation of
libbpf-rs'sSkelBuilder,OpenSkel, andSkeltraits - Improved error reporting on BPF C file compilation failure
New Contributors
- @yan-ace62 made their first contribution in #436
- @yunbo-xufeng made their first contribution in #441
Full Changelog: v0.20.1...v0.21.0
v0.20.1
What's Changed
libbpf-rs
- Added bindings for BTF via newly introduced
btfmodule - Added
Mapconstructors from pinned paths and from map id - Added
Map::as_libbpf_bpf_map_ptrandObject::as_libbpf_bpf_object_ptraccessors - Added
MapInfotype as a convenience wrapper aroundbpf_map_info- Added
Map::infotoMapto make it easier to deriveMapInfofrom aMapinstance
- Added
- Added
set_log_level,log_level, andautoloadmethods toOpenProgram - Removed deprecated
Link::get_fdmethod - Bumped minimum Rust version to
1.63
libbpf-cargo
- Switched over to using
libbpf-rs's BTF support internally for skeleton generation - Fixed potential build failures on systems defaulting to stack protector usage by passing
-fno-stack-protectortoclang
New Contributors
- @heyrutvik made their first contribution in #388
- @d-e-s-o made their first contribution in #389
Full Changelog: v0.20.0...v0.20.1
v0.20.0
What's Changed
libbpf-rs
- Added support for USDT probes
- Added BPF linker support with new
Linkertype - Added
Program::attach_uprobe_with_optsfor attaching Uprobes with additional options - Added
tproxyexample - Added option to
RingBuffer::pollto block indefinitely - Added support for querying BPF program type using
OpenProgram::prog_type - Added support for retrieving a BPF program's instructions using
OpenProgram::insns&Program::insns - Added
MapType::is_supported,ProgramType::is_supported, andProgramType::is_helper_supportedmethods - Added
PerfBuffer::as_libbpf_perf_buffer_ptrto access underlyinglibbpf-sysobject - Adjusted various
Mapmethods to work on shared receivers - Fixed
Link::openconstructor to be a static method - Fixed unsoundness in skeleton logic caused by aliased
Boxcontents - Implemented
SendforPerfBufferandRingBuffer - Made more types implement
CloneandDebug - Run leak sanitizer in CI
- Updated various dependencies
libbpf-cargo
- Fixed mismatch in size of generated types with respect to corresponding C types
- Fixed generated skeleton potentially being unstable (changing each time)
- Implemented
Syncfor generated skeletons - Made formatting using
rustfmtoptional - Updated various dependencies
New Contributors
- @ueno made their first contribution in #277
- @jirutka made their first contribution in #283
- @yunwei37 made their first contribution in #286
- @yuval-k made their first contribution in #295
- @michel-slm made their first contribution in #338
- @vankoven made their first contribution in #369
- @mendess made their first contribution in #371
Full Changelog: v0.19.1...v0.20.0