All Projects → aya-rs → aya

aya-rs / aya

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

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to aya

Cilium
eBPF-based Networking, Security, and Observability
Stars: ✭ 10,256 (+979.58%)
Mutual labels:  ebpf, observability, bpf
Tcpdog
eBPF based TCP observability.
Stars: ✭ 119 (-87.47%)
Mutual labels:  ebpf, observability, bpf
libbpf-sys
Rust bindings to libbpf from the Linux kernel
Stars: ✭ 103 (-89.16%)
Mutual labels:  ebpf, bpf
parca-agent
eBPF based always-on profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
Stars: ✭ 250 (-73.68%)
Mutual labels:  ebpf, observability
hubble-ui
Observability & Troubleshooting for Kubernetes Services
Stars: ✭ 210 (-77.89%)
Mutual labels:  ebpf, observability
Xdp Project
XDP project collaboration through a git-repo
Stars: ✭ 127 (-86.63%)
Mutual labels:  ebpf, bpf
Polycube
eBPF/XDP-based software framework for fast network services running in the Linux kernel.
Stars: ✭ 217 (-77.16%)
Mutual labels:  ebpf, bpf
portablebpf
You came here so you could have a base code to serve you as an example on how to develop a BPF application, compatible to BCC and/or LIBBPF, specially LIBBPF, having the userland part made in C or PYTHON.
Stars: ✭ 32 (-96.63%)
Mutual labels:  ebpf, bpf
Kubectl Trace
Schedule bpftrace programs on your kubernetes cluster using the kubectl
Stars: ✭ 1,194 (+25.68%)
Mutual labels:  ebpf, bpf
cilium-cli
CLI to install, manage & troubleshoot Kubernetes clusters running Cilium
Stars: ✭ 162 (-82.95%)
Mutual labels:  ebpf, observability
ebpf
eBPF package for Go
Stars: ✭ 25 (-97.37%)
Mutual labels:  ebpf, bpf
KubeArmor
Cloud-native Runtime Security Enforcement System
Stars: ✭ 434 (-54.32%)
Mutual labels:  ebpf, bpf
Libbpf Rs
Minimal and opinionated eBPF tooling for the Rust ecosystem
Stars: ✭ 116 (-87.79%)
Mutual labels:  ebpf, bpf
go-tc
traffic control in pure go - it allows to read and alter queues, filters and classes
Stars: ✭ 245 (-74.21%)
Mutual labels:  ebpf, bpf
Hubble
Hubble - Network, Service & Security Observability for Kubernetes using eBPF
Stars: ✭ 1,245 (+31.05%)
Mutual labels:  ebpf, observability
ilogtail
Fast and Lightweight Observability Data Collector
Stars: ✭ 1,035 (+8.95%)
Mutual labels:  ebpf, observability
p2pflow
Ethereum p2p traffic analysis with eBPF
Stars: ✭ 24 (-97.47%)
Mutual labels:  ebpf, bpf
Awesome Ebpf
A curated list of awesome projects related to eBPF.
Stars: ✭ 1,102 (+16%)
Mutual labels:  ebpf, bpf
ebpfault
A BPF-based syscall fault injector
Stars: ✭ 65 (-93.16%)
Mutual labels:  ebpf, bpf
ebpfpub
ebpfpub is a generic function tracing library for Linux that supports tracepoints, kprobes and uprobes.
Stars: ✭ 86 (-90.95%)
Mutual labels:  ebpf, bpf

Aya

Crates.io License Build status Book

API Documentation

Unreleased Documentation Documentaiton

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 https://ebpf.io/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 std::convert::TryInto;
use aya::Bpf;
use aya::programs::{CgroupSkb, CgroupSkbAttachType};

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

// get the `ingress_filter` program compiled into `bpf.o`.
let ingress: &mut CgroupSkb = bpf.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)?;

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].