finds.dev← search

// the find

aya-rs/aya

★ 4,601 · Rust · Apache-2.0 · updated Jun 2026

Aya is an eBPF library for the Rust programming language, built with a focus on developer experience and operability.

Aya lets you write eBPF programs in Rust — both the kernel-side BPF bytecode and the userspace loader — without touching libbpf or a C toolchain. It's for Rust developers who want to do kernel observability, networking (XDP, TC), or security (LSM) work without leaving the Rust ecosystem. BTF support means you compile once and the binary runs across kernel versions.

No C toolchain dependency is the real win here — aya-build handles the cross-compilation setup and you get a self-contained binary. BTF-based CO-RE relocation is implemented in pure Rust (aya-obj/src/btf/relocation.rs), so portability isn't an afterthought bolted onto libbpf. Program type coverage is genuinely broad: XDP, TC, kprobes, uprobes, LSM, fentry/fexit, cgroup hooks, perf events — most of what you'd actually reach for is there. The async support with tokio is a practical choice; most userspace eBPF consumers are already async.

The split between legacy maps (aya-ebpf/src/maps/) and BTF maps (aya-ebpf/src/btf_maps/) is confusing — two parallel implementations of the same map types, and the migration path isn't obvious from the docs. Windows and macOS are non-starters since this is Linux kernel technology, but that also means local dev on non-Linux machines requires a VM, which the getting-started docs undersell. Error messages from verifier failures get surfaced as raw kernel strings, which are already cryptic in C tools — aya doesn't improve that experience. The aya-tool bindgen wrapper helps generate kernel type bindings, but it's a separate install step that trips up new users before they write a single line of BPF.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →