Releases: libbpf/libbpf-rs
Releases · libbpf/libbpf-rs
v0.24.3
What's Changed
libbpf-cargo
- Silenced possible
clippyreported warnings in generated skeleton when BPF object file does not contain any maps
Full Changelog: v0.24.2...v0.24.3
v0.24.2
What's Changed
libbpf-cargo
- Fixed panic on "open" of skeleton with
kconfigmap
Full Changelog: v0.24.1...v0.24.2
v0.24.1
What's Changed
libbpf-cargo
- Fixed missing BPF object cleanup after skeleton destruction
Full Changelog: v0.24.0...v0.24.1
v0.24.0
What's Changed
libbpf-rs
- Split
{Open,}{Map,Program}into{Open,}{Map,Program}(for shared access) and{Open,}{Map,Program}Mut(for exclusive access) - Added
AsRawLibbpfimpl forOpenObjectandObjectBuilder - Decoupled
MapandMapHandlemore and introducedMapCoretrait abstracting over common functionality - Adjusted
SkelBuilder::openmethod to require mutable reference to storage space for BPF object - Adjusted
{Open,}Object::from_ptrconstructor to be infallible - Added
{Open,}Object::maps{_mut,}and{Open,}Object::progs{_mut,}for BPF map and program iteration - Adjusted various APIs to return/use
OsStrinstead ofCStrorstr - Adjusted
{Open,}Programto lazily retrieve name and section- Changed
nameandsectionmethods to return&OsStrand made constructors infallible
- Changed
- Adjusted
OpenObject::nameto returnOption<&OsStr> - Removed
Resultreturn type fromOpenProgram::{set_log_level,set_autoload,set_flags} - Added
Object::namemethod - Added
CopyandCloneimpls for types insidebtf::typesmodule - Adjusted
OpenMap::set_inner_map_fdto returnResult - Adjusted
ProgramInput::context_infield to be a mutable reference - Made inner
query::Tagcontents publicly accessible - Fixed potential memory leak in
RingBufferBuilder::build - Removed
Displayimplementation of variousenumtypes
libbpf-cargo
- Reworked generated skeletons to contain publicly accessible maps and program members, no longer requiring method calls
- Adjusted skeleton creation logic to generate Rust types for all types available in BPF
- Renamed module for generated Rust types from
<project>_typesto justtypes - Renamed generated
struct_opstype toStructOpsand moved it out oftypesmodule - Fixed Rust code generation logic to properly create
Defaultimpl for arrays of pointers
New Contributors
Full Changelog: v0.23.3...v0.24.0
v0.23.3
What's Changed
libbpf-cargo
- Fixed generation of
Defaultimpl in presence of large padding arrays
New Contributors
- @rbartlensky made their first contribution in #786
Full Changelog: v0.23.2...v0.23.3
v0.23.2
What's Changed
libbpf-rs
- Fixed build failure on Android platforms
New Contributors
Full Changelog: v0.23.1...v0.23.2
v0.23.1
What's Changed
libbpf-rs
- Added support for user ring buffers
- Fixed handling of bloom filter type maps
- Added
Map::lookup_bloom_filterfor looking up elements in a bloom filter
- Added
libbpf-cargo
- Added "import injection" escape hatch to generated skeletons
New Contributors
- @ThisSeanZhang made their first contribution in #770
- @barthr made their first contribution in #778
Full Changelog: v0.23.0...v0.23.1
v0.23.0
What's Changed
libbpf-rs
- Overhauled crate feature set:
- Removed
novendorfeature - Added
vendoredfeature to use vendored copies of all needed libraries
- Removed
- Added
Program::attach_ksyscallfor attaching to ksyscall handlers - Added
Program::test_runas a way for test-running programs - Added
OpenMap::initial_value{,_mut}for retrieving a map's initial value - Added
replacefunctionality toXdptype - Added low-level
consume_rawandpoll_rawmethods toRingBuffertype - Added
recursion_missesattribute toquery::ProgramInfotype - Added
AsRawLibbpfimpl forOpenProgram - Fixed incorrect inference of
btf::types::MemberAttr::Bitfieldvariant - Fixed examples not building on non-x86 architectures
- Fixed potentially missing padding byte initialization on some target architectures
- Fixed compilation issues caused by mismatching function signatures in certain cross-compilation contexts
- Updated
libbpf-sysdependency to1.4.0 - Bumped minimum Rust version to
1.71
libbpf-cargo
- Removed
novendorfeature in favor of having disableable default feature - Added support for
struct_opsshadow objects for generated skeletons - Added support for handling custom data sections in generated skeletons
- Adjusted
SkeletonBuilder::clang_argsto accept an iterator of arguments instead of a string - Added
--clang-argsargument tomakeandbuildsub-commands - Put all generated types into single
<project>_typesmodule as opposed to having multiple modules for various sections (.bss,.rodata, etc.) - Fixed potential naming issues by escaping reserved keywords used in identifiers
- Fixed potential unsoundness issues in generated skeletons by wrapping "unsafe" type in
MaybeUninit - Added pointer based ("raw") access to datasec type to generated skeletons
- Added better handling for bitfields to code generation logic
- Updated
libbpf-sysdependency to1.4.0 - Bumped minimum Rust version to
1.71
New Contributors
- @arighi made their first contribution in #680
- @jfernandez made their first contribution in #687
- @honsunrise made their first contribution in #693
- @EHfive made their first contribution in #742
- @eliad-wiz made their first contribution in #750
Full Changelog: v0.22.1...v0.23.0
v0.22.1
What's Changed
libbpf-rs
- Introduced
Xdptype for working with XDP programs - Fixed handling of autocreate maps with
Objecttype
New Contributors
- @eyakubovich made their first contribution in #637
Full Changelog: v0.22.0...v0.22.1
v0.22.0
What's Changed
libbpf-rs
- Reworked
Errortype:- Replaced
enumwith data variants withstructhiding internal structure - Added support for chaining of errors
- Overhauled how errors are displayed
- Replaced
- Overhauled
query::ProgramInfoandquery::ProgInfoIterto make them more readily usable - Added
Btf::from_vmlinuxconstructor and adjustedBtf::from_pathto work with both raw and ELF files - Reworked
ObjectBuilder:- Made
namemethod fallible - Adjusted
optsto return a reference tolibbpf_sys::bpf_object_open_opts - Removed object name argument from
open_memoryconstructor - Added
pin_root_pathsetter
- Made
- Added
AsRawLibbpftrait as a unified way to retrievelibbpfequivalents forlibbpf-rsobjects - Added
Map::update_batchmethod - Implemented
SendforLink - Bumped minimum Rust version to
1.65 - Updated
bitflagsdependency to2.0
libbpf-cargo
- Adjusted skeleton creation logic to generate shared and exclusive datasec accessor functions
- Removed
Errorenum in favor ofanyhow::Error - Bumped minimum Rust version to
1.65
New Contributors
Full Changelog: v0.21.2...v0.22.0