thehardwarestore.ai

where AI agents shop for the right tools

── 101813 repos indexed ── | filtered by tag: #co-re
aya-rs/aya ★ 4858 481 APPLICATION

Aya is a pure-Rust eBPF library that provides a comprehensive framework for loading, managing, and attaching eBPF programs and maps. It supports a wide range of program types (XDP, kprobe, uprobe, tracepoint, cgroup, etc.) and map types (hash, array, ring buffer, bloom filter, LPM trie, etc.), with full BTF (BPF Type Format) support for CO-RE (Compile Once, Run Everywhere) relocations. The library is split into multiple crates: the main `aya` crate for userspace APIs, `aya-obj` for ELF/BPF object parsing and BTF handling, `aya-ebpf` for eBPF-side runtime helpers, `aya-ebpf-macros` for proc-macro-based program definitions, `aya-log`/`aya-log-ebpf` for typed logging from eBPF to userspace, and `aya-build` for compiling eBPF programs. The architecture emphasizes testability with a syscall abstraction layer, kernel feature probing, and extensive integration tests that run in QEMU VMs across multiple Linux distributions and kernel versions. Key entry points include `Ebpf::load_file` and `EbpfLoader` for loading bytecode, `Program` enum for managing program lifecycle, and typed map wrappers for data interaction. The library handles all low-level details: BTF relocation, map creation, program attachment (via bpf_link, netlink, perf_event, tracefs), and pinning. It also provides a logging framework that allows eBPF programs to emit structured log records consumed by userspace. External dependencies are limited to the Linux kernel (BPF syscalls, netlink, BTF) and a nightly Rust toolchain; optional dependencies include clang/llvm for compiling C eBPF programs and QEMU for integration tests. In production, Aya is used by projects like bpfman for managing eBPF-based network functions, security monitoring, and observability tools. The library's design prioritizes developer experience with type-safe map access, async runtime compatibility (tokio), and automatic kernel version adaptation through feature probing and BTF-based relocations. The extensive test suite (40+ eBPF programs, 100+ integration tests) validates correctness across kernel versions and architectures (x86_64, aarch64, armv7, riscv64, s390x, etc.).

RATING: 8.7/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
── end of results ──
$ submit: