Skip to content

Releases: libbpf/libbpf-rs

v0.26.0

04 Feb 21:31

Choose a tag to compare

What's Changed

libbpf-rs

  • Added Link::info method for retrieving LinkInfo
  • Extended LinkTypeInfo::PerfEvent variant to contain newly added PerfEventLinkInfo object
  • Added Linker::add_buf method for adding in-memory ELF files to the set of objects to link
  • Added Program::attach_iter_with_opts for attaching to iterators with additional options
  • Added Program::attach_uprobe_multi & Program::attach_uprobe_multi_opts to enable attachments of multi uprobes at once
  • Added Program::{stdout,stderr} for accessing BPF stdout and stderr streams
  • Added OpenProgram::autoload getter
  • Added OpenMap::autocreate and Map::autocreate getters
  • Added MapCore::lookup_into for looking up values into preallocated buffers
  • Added verified_insns attribute to query::ProgramInfo type
  • Made query::ProgramInfo non-exhaustive
  • Added ObjectBuilder::btf_custom_path setter

libbpf-cargo

  • Fixed Rust type generation for trailing bitfields in composite C types
  • Fixed handling of XxxSkelBuilder::obj_builder customizations when using open() constructor
  • Allowlisted libbpf-sys 1.6.3

New Contributors

Full Changelog: v0.26.0-beta.1...v0.26.0

v0.26.0-beta.1

11 Aug 17:41

Choose a tag to compare

What's Changed

libbpf-cargo

  • Allowlisted libbpf-sys 1.6.1

Full Changelog: v0.26.0-beta.0...v0.26.0-beta.1

v0.26.0-beta.0

24 Jul 16:58

Choose a tag to compare

What's Changed

libbpf-rs

  • Added target_obj_id and target_btf_id fields to TracingLinkInfo to expose BTF information directly from kernel queries
  • Removed previously deprecated Program::get_id_by_fd method
  • Bumped minimum Rust version to 1.82

libbpf-cargo

  • Moved BPF object content in generated skeletons into .bpf.objs section allowing easy extraction from the final binary
  • Bumped minimum Rust version to 1.82

New Contributors

Full Changelog: v0.25.0...v0.26.0-beta.0

v0.25.0

30 May 16:01

Choose a tag to compare

What's Changed

libbpf-rs

  • Added kprobe multi support for attaching programs, with and without providing additional options
  • Added Program::attach_perf_event_with_opts for attaching to perf events with additional options
  • Allow to provide additional options when attaching programs to raw tracepoints
  • Allow to provide additional options when attaching programs to kprobes
  • Introduced TracepointCategory enum for specifying tracepoint categories
  • Added max_entries getter to various map types
  • Added OpenProgramMut::set_autoattach
  • Added additional ProgramAttachType and query::LinkTypeInfo variants
  • Adjusted UprobeOpts::func_name to be an Option
  • Implemented Sync for Link
  • Updated libbpf-sys dependency to 1.5.0
  • Added ProgramInput::repeat field to run a test multiple times
  • Added ProgramOutput::duration field which represent the average duration per repetition
  • Added RingBuffer::consume_raw_n method to consume up to N items

libbpf-cargo

  • Adjusted all <xxx>_data BPF map skeleton members to be Options
  • Adjusted numbering of generated Rust structs for anonymous C types to be less fragile in the presence of type additions
  • Removed SkeletonBuilder::skip_clang_version_check and SkeletonBuilder::debug
  • Removed --skip-clang-version-checks option of libbpf build sub-command
  • Replaced --debug option of libbpf sub-command with -v / --verbose
    • Removed --quiet option of libbpf make sub-command
  • Replaced CompilationOutput type with tracing based solution using newly added util::CargoWarningFormatter
  • Fixed handling of multiple types of same name in BTF by enumerating them in the generated skeleton
  • Bumped minimum Rust version to 1.78

New Contributors

Full Changelog: v0.25.0-beta.1...v0.25.0

v0.25.0-beta.1

17 Dec 17:59

Choose a tag to compare

What's Changed

libbpf-rs

  • Adjusted btf::types::EnumMember to store value as i64
  • Adjusted btf::types::Enum64Member to store value as i128

libbpf-cargo

  • Fixed skeleton generation when enum64 types are present

New Contributors

Full Changelog: v0.25.0-beta.0...v0.25.0-beta.1

v0.25.0-beta.0

19 Nov 22:48

Choose a tag to compare

What's Changed

libbpf-rs

  • Added Map::lookup_batch and Map::lookup_and_delete_batch method

libbpf-cargo

  • Represent C enums with custom types and const fields
    • Adjusted Rust correspondents in generated skeletons to no longer be wrapped in MaybeUninit
  • Adjusted SkeletonBuilder::build* methods to return CompilationOutput on success

New Contributors

Full Changelog: v0.24.8...v0.25.0-beta.0

v0.24.8

08 Nov 17:32

Choose a tag to compare

What's Changed

libbpf-rs

  • Added Program::attach_netfilter_with_opts for attaching to netfilter hooks

Full Changelog: v0.24.8...v0.24.8

v0.24.7

04 Nov 21:23

Choose a tag to compare

What's Changed

libbpf-cargo

  • Fixed handling of empty unions in BPF types

New Contributors

Full Changelog: v0.24.6...v0.24.7

v0.24.6

11 Oct 21:10

Choose a tag to compare

What's Changed

libbpf-cargo

  • Fixed incorrect Cargo environment variable query when used in build script context

New Contributors

  • @kxxt made their first contribution in #959

Full Changelog: v0.24.5...v0.24.6

v0.24.5

30 Sep 20:10

Choose a tag to compare

What's Changed

libbpf-rs

  • Renamed Program::get_id_by_fd to id_from_fd
    • Deprecated Program::get_id_by_fd
  • Renamed Program::get_fd_by_id to fd_from_id
    • Deprecated Program::get_fd_by_id
  • Adjusted Program::{attach_*, test_run} methods to work on shared receivers
  • Adjusted PerfBufferBuilder to work with MapCore objects

New Contributors

Full Changelog: v0.24.4...v0.24.5