Voltar ao ranking

aya-rs/aya

Rustaya-rs.dev/book/

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

ebpfbpfrustobservabilitysecurity
Crescimento de estrelas
Estrelas
4.7k
Forks
455
Crescimento semanal
Issues
131
2k4k
jun. de 2021fev. de 2023nov. de 2024jul. de 2026
Artefatoscrates.iocargo add aya
README

Aya

Crates.io License Build status Book Gurubase

API Documentation

Unreleased Documentation Documentation

Community

Discord Awesome

Join the conversation on Discord to discuss anything related to Aya or discover and contribute to a list of Awesome Aya projects.

Overview

eBPF is a technology that allows running user-supplied programs inside the Linux kernel. For more info see What is eBPF.

Aya is an eBPF library built with a focus on operability and developer experience. It does not rely on libbpf nor bcc - it's built from the ground up purely in Rust, using only the libc crate to execute syscalls. With BTF support and when linked with musl, it offers a true compile once, run everywhere solution, where a single self-contained binary can be deployed on many linux distributions and kernel versions.

Some of the major features provided include:

  • Support for the BPF Type Format (BTF), which is transparently enabled when supported by the target kernel. This allows eBPF programs compiled against one kernel version to run on different kernel versions without the need to recompile.
  • Support for function call relocation and global data maps, which allows eBPF programs to make function calls and use global variables and initializers.
  • Async support with both tokio and async-std.
  • Easy to deploy and fast to build: aya doesn't require a kernel build or compiled headers, and not even a C toolchain; a release build completes in a matter of seconds.

Example

Aya supports a large chunk of the eBPF API. The following example shows how to use a BPF_PROG_TYPE_CGROUP_SKB program with aya:

use std::fs::File;
use aya::Ebpf;
use aya::programs::{CgroupSkb, CgroupSkbAttachType, CgroupAttachMode};

// load the BPF code
let mut ebpf = Ebpf::load_file("ebpf.o")?;

// get the `ingress_filter` program compiled into `ebpf.o`.
let ingress: &mut CgroupSkb = ebpf.program_mut("ingress_filter")?.try_into()?;

// load the program into the kernel
ingress.load()?;

// attach the program to the root cgroup. `ingress_filter` will be called for all
// incoming packets.
let cgroup = File::open("/sys/fs/cgroup/unified")?;
ingress.attach(cgroup, CgroupSkbAttachType::Ingress, CgroupAttachMode::AllowOverride)?;

Contributing

Please see the contributing guide.

License

Aya is distributed under the terms of either the MIT license or the Apache License (version 2.0), at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Repositórios relacionados
apache/skywalking

APM, Application Performance Monitoring System

JavaMavenApache License 2.0skywalkingobservability
skywalking.apache.org
24.9k6.6k
cilium/cilium

eBPF-based Networking, Security, and Observability

GoGo ModulesApache License 2.0containersbpf
cilium.io
24.8k3.9k
kubesphere/kubesphere

The container platform tailored for Kubernetes multi-cloud, datacenter, and edge management ⎈ 🖥 ☁️

GoGo ModulesOtherdevopscncf
kubesphere.io
17k2.7k
gojue/ecapture

Capturing SSL/TLS plaintext without a CA certificate using eBPF. Supported on Linux/Android kernels for amd64/arm64.

CApache License 2.0golangebpf
ecapture.cc
15.4k1.6k
kubeshark/kubeshark

eBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.

GoGo ModulesApache License 2.0kubernetesgolang
kubeshark.com
12k542
bpftrace/bpftrace

High-level tracing language for Linux

C++Apache License 2.0bpfebpf
bpftrace.org
10.2k1.5k
falcosecurity/falco

Cloud Native Runtime Security

C++Apache License 2.0cncfcontainers
falco.org
9.2k1.1k
ntop/ntopng

Web-based Traffic and Cybersecurity Network Traffic Monitoring

LuaGNU General Public License v3.0ntopngrealtime
ntop.org
8k751
cilium/ebpf

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

GoGo ModulesMIT Licenseebpflinux
ebpf-go.dev
7.9k879
coroot/coroot

Coroot is an open-source observability and APM tool with AI-powered Root Cause Analysis. It combines metrics, logs, traces, continuous profiling, and SLO-based alerting with predefined dashboards and inspections.

GoGo ModulesApache License 2.0dashboarddatabase-monitoring
coroot.com
7.8k385
projectcalico/calico

Cloud native networking and network security

GoGo ModulesApache License 2.0cnicni-plugin
docs.tigera.io/calico/latest/about/
7.3k1.6k
pixie-io/pixie

Instant Kubernetes-Native Application Observability

C++Apache License 2.0golangkubernetes
px.dev
6.5k499