Releases: libbpf/libbpf-rs
Releases · libbpf/libbpf-rs
v0.24.5
What's Changed
libbpf-rs
- Renamed
Program::get_id_by_fd
toid_from_fd
- Deprecated
Program::get_id_by_fd
- Deprecated
- Renamed
Program::get_fd_by_id
tofd_from_id
- Deprecated
Program::get_fd_by_id
- Deprecated
- Adjusted
Program::{attach_*, test_run}
methods to work on shared receivers - Adjusted
PerfBufferBuilder
to work withMapCore
objects
New Contributors
- @CoderPoet made their first contribution in #939
- @lbrndnr made their first contribution in #951
Full Changelog: v0.24.4...v0.24.5
v0.24.4
What's Changed
libbpf-rs
- Added
Program::fd_from_pinned_path
method for restoring program descriptor from a pinned path
libbpf-cargo
- Adjusted skeleton generation code to work around
libbpf
forward compatibility issue when an old systemlibbpf
is being used instead of the vendored copy
Full Changelog: v0.24.3...v0.24.4
v0.24.3
What's Changed
libbpf-cargo
- Silenced possible
clippy
reported 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
kconfig
map
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
AsRawLibbpf
impl forOpenObject
andObjectBuilder
- Decoupled
Map
andMapHandle
more and introducedMapCore
trait abstracting over common functionality - Adjusted
SkelBuilder::open
method to require mutable reference to storage space for BPF object - Adjusted
{Open,}Object::from_ptr
constructor 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
OsStr
instead ofCStr
orstr
- Adjusted
{Open,}Program
to lazily retrieve name and section- Changed
name
andsection
methods to return&OsStr
and made constructors infallible
- Changed
- Adjusted
OpenObject::name
to returnOption<&OsStr>
- Removed
Result
return type fromOpenProgram::{set_log_level,set_autoload,set_flags}
- Added
Object::name
method - Added
Copy
andClone
impls for types insidebtf::types
module - Adjusted
OpenMap::set_inner_map_fd
to returnResult
- Adjusted
ProgramInput::context_in
field to be a mutable reference - Made inner
query::Tag
contents publicly accessible - Fixed potential memory leak in
RingBufferBuilder::build
- Removed
Display
implementation of variousenum
types
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>_types
to justtypes
- Renamed generated
struct_ops
type toStructOps
and moved it out oftypes
module - Fixed Rust code generation logic to properly create
Default
impl 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
Default
impl 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_filter
for 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
novendor
feature - Added
vendored
feature to use vendored copies of all needed libraries
- Removed
- Added
Program::attach_ksyscall
for attaching to ksyscall handlers - Added
Program::test_run
as a way for test-running programs - Added
OpenMap::initial_value{,_mut}
for retrieving a map's initial value - Added
replace
functionality toXdp
type - Added low-level
consume_raw
andpoll_raw
methods toRingBuffer
type - Added
recursion_misses
attribute toquery::ProgramInfo
type - Added
AsRawLibbpf
impl forOpenProgram
- Fixed incorrect inference of
btf::types::MemberAttr::Bitfield
variant - 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-sys
dependency to1.4.0
- Bumped minimum Rust version to
1.71
libbpf-cargo
- Removed
novendor
feature in favor of having disableable default feature - Added support for
struct_ops
shadow objects for generated skeletons - Added support for handling custom data sections in generated skeletons
- Adjusted
SkeletonBuilder::clang_args
to accept an iterator of arguments instead of a string - Added
--clang-args
argument tomake
andbuild
sub-commands - Put all generated types into single
<project>_types
module 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-sys
dependency 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