NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #4462 most downloaded on crates.io
Cargo plugin to build bpf programs
Latest stable
0.27.2
Last release 1 months ago
25 Sep 2026
Release timing varies
gaps range from 2 weeks to 6 months
Some releases are documented
notes for 27 of 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
64 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Added _data skeleton members for accessing __arena global variables
MapType::Arena variant<arena-map>_data skeleton members for accessing __arena global variablesFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.27.1...v0.27.2
Added documentation aliases for underlying libbpf C functionality to various types/functions
libbpf C functionality to various types/functions.o extension for object filesFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.27.0...v0.27.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Added KprobeMultiLinkInfo & UprobeMultiLinkInfo fields that required a second info call
KprobeMultiLinkInfo & UprobeMultiLinkInfo fields that required a second info callkey_size, value_size and more getters to OpenMap{,Mut}IterLinkInfo fields for LinkTypeInfo::IterErrorKind::TooBig variant, surfaced when the underlying operation fails with E2BIG (e.g., a map reaching max_entries)MapHandle::from_pinned_path_with_file_flags for opening maps with custom file flagsquery info types to be OsString instead of CStringquery::*Info types non-exhaustiveFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.26.2...v0.27.0
Added ProgramMut::assoc_struct_ops for associating non-struct_ops programs with struct_ops maps
ProgramMut::assoc_struct_ops for associating non-struct_ops programs with struct_ops mapsIterOpts::None variant for attach_iter_with_opts()libbpf-sys dependency to 1.7.0missing-docs lint suppression on generated skeletonFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.26.1...v0.26.2
missing-docs lint suppression on generated skeletonlibbpf-sys dependency to 1.7.0Added MapCore::query_fdinfo for querying map fdinfo
MapCore::query_fdinfo for querying map fdinfoProgramType::Netfilter variantProgram::attach_uprobe_multi_with_opts to work with empty func_patternSkeletonBuilder::reference_obj for enabling generate skeleton to reference an object file instead of embedding itFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.26.0...v0.26.1
Added Link::info method for retrieving LinkInfo
Link::info method for retrieving LinkInfoLinkTypeInfo::PerfEvent variant to contain newly added PerfEventLinkInfo objectLinker::add_buf method for adding in-memory ELF files to the set of objects to linkProgram::attach_iter_with_opts for attaching to iterators with additional optionsProgram::attach_uprobe_multi & Program::attach_uprobe_multi_opts to enable attachments of multi uprobes at onceProgram::{stdout,stderr} for accessing BPF stdout and stderr streamsOpenProgram::autoload getterOpenMap::autocreate and Map::autocreate gettersMapCore::lookup_into for looking up values into preallocated buffersverified_insns attribute to query::ProgramInfo typequery::ProgramInfo non-exhaustiveObjectBuilder::btf_custom_path setterXxxSkelBuilder::obj_builder customizations when using open() constructorlibbpf-sys 1.6.3Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.26.0-beta.1...v0.26.0
## What's Changed ### libbpf-cargo - Allowlisted libbpf-sys 1.6.1 Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.26.0-beta.0...v0.26.0
libbpf-sys 1.6.1Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.26.0-beta.0...v0.26.0-beta.1
Removed previously deprecated Program::get_id_by_fd method
target_obj_id and target_btf_id fields to TracingLinkInfo to expose BTF information directly from kernel queriesProgram::get_id_by_fd method1.82.bpf.objs section allowing easy extraction from the final binary1.82Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.25.0...v0.26.0-beta.0
Added kprobe multi support for attaching programs, with and without providing additional options
Program::attach_perf_event_with_opts for attaching to perf events with additional optionsTracepointCategory enum for specifying tracepoint categoriesmax_entries getter to various map typesOpenProgramMut::set_autoattachProgramAttachType and query::LinkTypeInfo variantsUprobeOpts::func_name to be an OptionSync for Linklibbpf-sys dependency to 1.5.0ProgramInput::repeat field to run a test multiple timesProgramOutput::duration field which represent the average duration per repetitionRingBuffer::consume_raw_n method to consume up to N items<xxx>_data BPF map skeleton members to be OptionsSkeletonBuilder::skip_clang_version_check and SkeletonBuilder::debug--skip-clang-version-checks option of libbpf build sub-command--debug option of libbpf sub-command with -v / --verbose
--quiet option of libbpf make sub-commandCompilationOutput type with tracing based solution using newly added util::CargoWarningFormatter1.78Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.25.0-beta.1...v0.25.0
Adjusted btf::EnumMember to store value as i64
btf::types::EnumMember to store value as i64btf::types::Enum64Member to store value as i128enum64 types are presentFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.25.0-beta.0...v0.25.0-beta.1
Added Map::lookup_batch and Map::lookup_and_delete_batch method
Map::lookup_batch and Map::lookup_and_delete_batch methodMaybeUninitSkeletonBuilder::build* methods to return CompilationOutput on successFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.8...v0.25.0-beta.0
Added Program::attach_netfilter_with_opts for attaching to netfilter hooks
Program::attach_netfilter_with_opts for attaching to netfilter hooksFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.8...v0.24.8
Fixed handling of empty unions in BPF types
Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.6...v0.24.7
Fixed incorrect Cargo environment variable query when used in build script context
Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.5...v0.24.6
Deprecated Program::get_id_by_fd
Program::get_id_by_fd to id_from_fd
Program::get_id_by_fdProgram::get_fd_by_id to fd_from_id
Program::get_fd_by_idProgram::{attach_*, test_run} methods to work on shared receiversPerfBufferBuilder to work with MapCore objectsFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.4...v0.24.5
Added Program::fd_from_pinned_path method for restoring program descriptor from a pinned path
Program::fd_from_pinned_path method for restoring program descriptor from a pinned pathlibbpf forward compatibility issue when an old system libbpf is being used instead of the vendored copyFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.3...v0.24.4
Silenced possible clippy reported warnings in generated skeleton when BPF object file does not contain any maps
clippy reported warnings in generated skeleton when BPF object file does not contain any mapsFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.2...v0.24.3
Fixed panic on "open" of skeleton with kconfig map
kconfig mapFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.1...v0.24.2
Fixed missing BPF object cleanup after skeleton destruction
Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.24.0...v0.24.1
Split {Open,}{Map,Program} into {Open,}{Map,Program} (for shared access) and {Open,}{Map,Program}Mut (for exclusive access)
{Open,}{Map,Program} into {Open,}{Map,Program} (for shared access) and {Open,}{Map,Program}Mut (for exclusive access)AsRawLibbpf impl for OpenObject and ObjectBuilderMap and MapHandle more and introduced MapCore trait abstracting over common functionalitySkelBuilder::open method to require mutable reference to storage space for BPF object{Open,}Object::from_ptr constructor to be infallible{Open,}Object::maps{_mut,} and {Open,}Object::progs{_mut,} for BPF map and program iterationOsStr instead of CStr or str{Open,}Program to lazily retrieve name and section
name and section methods to return &OsStr and made constructors infallibleOpenObject::name to return Option<&OsStr>Result return type from OpenProgram::{set_log_level,set_autoload,set_flags}Object::name methodCopy and Clone impls for types inside btf::types moduleOpenMap::set_inner_map_fd to return ResultProgramInput::context_in field to be a mutable referencequery::Tag contents publicly accessibleRingBufferBuilder::buildDisplay implementation of various enum types<project>_types to just typesstruct_ops type to StructOps and moved it out of types moduleDefault impl for arrays of pointersFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.23.3...v0.24.0
Fixed generation of Default impl in presence of large padding arrays
Default impl in presence of large padding arraysFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.23.2...v0.23.3
Fixed build failure on Android platforms
Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.23.1...v0.23.2
Added support for user ring buffers
Map::lookup_bloom_filter for looking up elements in a bloom filterFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.23.0...v0.23.1
Added vendored feature to use vendored copies of all needed libraries
novendor featurevendored feature to use vendored copies of all needed librariesProgram::attach_ksyscall for attaching to ksyscall handlersProgram::test_run as a way for test-running programsOpenMap::initial_value{,_mut} for retrieving a map's initial valuereplace functionality to Xdp typeconsume_raw and poll_raw methods to RingBuffer typerecursion_misses attribute to query::ProgramInfo typeAsRawLibbpf impl for OpenProgrambtf::types::MemberAttr::Bitfield variantlibbpf-sys dependency to 1.4.01.71novendor feature in favor of having disableable default featurestruct_ops shadow objects for generated skeletonsSkeletonBuilder::clang_args to accept an iterator of arguments instead of a string--clang-args argument to make and build sub-commands<project>_types module as opposed to having multiple modules for various sections (.bss, .rodata, etc.)MaybeUninitlibbpf-sys dependency to 1.4.01.71Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.22.1...v0.23.0
Introduced Xdp type for working with XDP programs
Xdp type for working with XDP programsObject typeFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.22.0...v0.22.1
Replaced enum with data variants with struct hiding internal structure
Error type:
enum with data variants with struct hiding internal structurequery::ProgramInfo and query::ProgInfoIter to make them more readily usableBtf::from_vmlinux constructor and adjusted Btf::from_path to work with both raw and ELF filesObjectBuilder:
name method fallibleopts to return a reference to libbpf_sys::bpf_object_open_optsopen_memory constructorpin_root_path setterAsRawLibbpf trait as a unified way to retrieve libbpf equivalents for libbpf-rs objectsMap::update_batch methodSend for Link1.65bitflags dependency to 2.0Error enum in favor of anyhow::Error1.65Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.21.2...v0.22.0
Enabled key iteration on MapHandle objects (formerly possible only on Map objects)
MapHandle objects (formerly possible only on Map objects)1.64Default impl for generated struct types containing pointers1.64Full Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.21.1...v0.21.2
Fixed build failures on 32 bit x86 and aarch32
pub visibilityFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.21.0...v0.21.1
Added TcHook::get_handle and TcHook::get_priority methods for restoring TcHook object
TcHook::get_handle and TcHook::get_priority methods for restoring TcHook objectProgram::get_fd_by_id and Program::get_id_by_fd methods for restoring bpf management dataMap::is_pinned and Map::get_pin_path methods for getting map pin statusProgram::attach_iter for attaching of programs to an iteratorMap::delete_batch method for bulk deletion of elementsMap typesMapHandle which provides most functionality previously found in MapMap objects standalone (i.e. maps not created by libbpf)<object-type>::fd() methods in favor of <object-type>::as_fd()btf_type_match! macro, adding support for most of Rust's match capabilitiesskel module exposing skeleton related traitsMap created or opened without going through Object would leak file descriptorslibbpf_sys::bpf_object_open_opts object initializationBorrowedFd instead of raw file descriptorsRingBufferBuilder::add enforce that self cannot outlive the maps passed into itError::System variant textual representation to include errno stringlibbpf-rs's SkelBuilder, OpenSkel, and Skel traitsFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.20.1...v0.21.0
Removed deprecated Link::get_fd method
btf moduleMap constructors from pinned paths and from map idMap::as_libbpf_bpf_map_ptr and Object::as_libbpf_bpf_object_ptr accessorsMapInfo type as a convenience wrapper around bpf_map_info
Map::info to Map to make it easier to derive MapInfo from a Map instanceset_log_level, log_level, and autoload methods to OpenProgramLink::get_fd method1.63libbpf-rs's BTF support internally for skeleton generation-fno-stack-protector to clangFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.20.0...v0.20.1
Added BPF linker support with new Linker type
Linker typeProgram::attach_uprobe_with_opts for attaching Uprobes with additional optionstproxy exampleRingBuffer::poll to block indefinitelyOpenProgram::prog_typeOpenProgram::insns & Program::insnsMapType::is_supported, ProgramType::is_supported, and ProgramType::is_helper_supported methodsPerfBuffer::as_libbpf_perf_buffer_ptr to access underlying libbpf-sys objectMap methods to work on shared receiversLink::open constructor to be a static methodBox contentsSend for PerfBuffer and RingBufferClone and DebugSync for generated skeletonsrustfmt optionalFull Changelog: https://github.com/libbpf/libbpf-rs/compare/v0.19.1...v0.20.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.