Aya is an eBPF library for the Rust programming language, built with a focus on developer experience and operability.
eBPF allows running user-supplied programs inside the Linux kernel, enabling deep system observability and security capabilities. Aya solves the problem of making eBPF accessible to Rust developers by providing a pure Rust implementation that does not depend on libbpf or bcc. Instead, it builds from the ground up using only the libc crate to execute syscalls, eliminating external C dependencies and their associated build complexity.
The tool is well-suited for developers building observability and security tools who want to avoid the overhead of managing C toolchains and kernel headers. It excels in deployment scenarios where portability matters: with BTF support and musl linking, Aya offers a compile-once-run-everywhere solution where a single self-contained binary can run across different Linux distributions and kernel versions without recompilation. The library supports major eBPF features including BPF Type Format for kernel version compatibility, function call relocation, global data maps with variables and initializers, and async support for both tokio and async-std runtimes. Build times are fast, completing release builds in seconds without requiring kernel builds or compiled headers.
The project maintains active community engagement through Discord discussion channels and curated lists of community projects. Development shows consistent attention to both core functionality and the developer experience, with ongoing work to expand eBPF API coverage and improve deployment ergonomics. The codebase demonstrates a commitment to pure Rust implementation as a design principle, avoiding external C dependencies that would complicate the build and deployment story.