All Projects → ingraind → Redbpf

ingraind / Redbpf

Licence: other
Rust library for building and running BPF/eBPF modules

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Redbpf

libebpf
Experiemental userspace eBPF library
Stars: ✭ 14 (-97.71%)
Mutual labels:  ebpf
Gba
A crate that helps you make GBA games
Stars: ✭ 286 (-53.19%)
Mutual labels:  rust-library
Bpfd
Framework for running BPF programs with rules on Linux as a daemon. Container aware.
Stars: ✭ 396 (-35.19%)
Mutual labels:  ebpf
bouheki
Tool for Preventing Data Exfiltration with eBPF
Stars: ✭ 28 (-95.42%)
Mutual labels:  ebpf
Grav
Performance visualisation tools
Stars: ✭ 262 (-57.12%)
Mutual labels:  ebpf
Imageproc
Image processing operations
Stars: ✭ 340 (-44.35%)
Mutual labels:  rust-library
poem
A full-featured and easy-to-use web framework with the Rust programming language.
Stars: ✭ 1,167 (+91%)
Mutual labels:  rust-library
Ureq
Minimal request library in rust.
Stars: ✭ 545 (-10.8%)
Mutual labels:  rust-library
Lingua Rs
👄 The most accurate natural language detection library in the Rust ecosystem, suitable for long and short text alike
Stars: ✭ 260 (-57.45%)
Mutual labels:  rust-library
Bpftrace
High-level tracing language for Linux eBPF
Stars: ✭ 4,526 (+640.75%)
Mutual labels:  ebpf
el7-bpf-specs
RPM specs for building bpf related tools on CentOS 7
Stars: ✭ 38 (-93.78%)
Mutual labels:  ebpf
gui
A generic UI library/framework.
Stars: ✭ 16 (-97.38%)
Mutual labels:  rust-library
Falco
Cloud Native Runtime Security
Stars: ✭ 4,340 (+610.31%)
Mutual labels:  ebpf
xfg-rs
eXtensible Framegraph
Stars: ✭ 34 (-94.44%)
Mutual labels:  rust-library
Ntopng
Web-based Traffic and Security Network Traffic Monitoring
Stars: ✭ 4,313 (+605.89%)
Mutual labels:  ebpf
libjail-rs
Rust implementation of a FreeBSD jail library
Stars: ✭ 32 (-94.76%)
Mutual labels:  rust-library
Rbpf
Rust virtual machine and JIT compiler for eBPF programs
Stars: ✭ 306 (-49.92%)
Mutual labels:  ebpf
Pixie
Instant Kubernetes-Native Application Observability
Stars: ✭ 589 (-3.6%)
Mutual labels:  ebpf
Printpdf
An easy-to-use library for writing PDF in Rust
Stars: ✭ 404 (-33.88%)
Mutual labels:  rust-library
Juniper
GraphQL server library for Rust
Stars: ✭ 4,187 (+585.27%)
Mutual labels:  rust-library

RedBPF

LICENSE CircleCI element

A Rust eBPF toolchain.

Overview

The redbpf project is a collection of tools and libraries to build eBPF programs using Rust. It includes:

  • redbpf - a user space library that can be used to load eBPF programs

  • redbpf-probes - an idiomatic Rust API to write eBPF programs that can be loaded by the linux kernel

  • redbpf-macros - companion crate to redbpf-probes which provides convenient procedural macros useful when writing eBPF programs

  • cargo-bpf - a cargo subcommand for creating, building and debugging eBPF programs

Requirements

In order to use redbpf you need LLVM 11 and the headers for the kernel you want to target.

Linux kernel

The minimum kernel version supported is 4.19. Kernel headers are discovered automatically, or you can use the KERNEL_SOURCE environment variable to point to a specific location. Building against a linux source tree is supported as long as you run make prepare first.

Installing dependencies on Debian based distributions

On Debian, Ubuntu and derivatives you can install the dependencies running:

sudo apt-get -y install build-essential zlib1g-dev \
		llvm-11-dev libclang-11-dev linux-headers-$(uname -r)

If your distribution doesn't have LLVM 11, you can add the official LLVM APT repository to your sources.list.

Installing dependencies on RPM based distributions

First ensure that your distro includes LLVM 11:

yum info llvm-devel | grep Version
Version      : 11.0.0

If you don't have vesion 11, you can get it from the Fedora 33 repository.

Then install the dependencies running:

yum install clang llvm-devel zlib-devel kernel-devel

Getting started

The easiest way to get started is using cargo-bpf, see the documentation for more info.

redbpf-tools is a cargo-bpf generated crate that includes simple examples you can use to understand how to structure your programs.

Finally the ingraind project includes more concrete examples of redbpf programs.

Building from source

After cloning the repository run:

git submodule sync
git submodule update --init

Install the dependencies as documented above, then run cargo build as usual.

License

This repository contains code from other software in the following directories, licensed under their own particular licenses:

  • bpf-sys/libelf/*: GPL2 + LGPL3
  • bpf-sys/bcc/*: Apache2, public domain
  • include/bpf_helpers.h LGPL2 + BSD-2
  • include/bpf_helper_defs.h: LGPL2 + BSD-2
  • bpf-sys/libbpf: LGPL2 + BSD-2

Where '+' means they are dual licensed.

RedBPF and its components, unless otherwise stated, are licensed under either of

at your option.

Contribution

This project is for everyone. We ask that our users and contributors take a few minutes to review our code of conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work 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].