Setup and Building bpfd
This section describes how to build bpfd. If this is the first time building bpfd, jump to the Development Environment Setup section for help installing the tooling.
Building bpfd
To just test with the latest bpfd, containerized image are stored in quay.io/bpfd
(see bpfd Container Images).
To build with local changes, use the following commands.
If you are building bpfd for the first time OR the eBPF code has changed:
If protobuf files have changed:
To build bpfd and bpfctl:
Development Environment Setup
To build bpfd, the following packages must be installed.
Install Rust Toolchain
For further detailed instructions, see Rust Stable & Rust Nightly.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
export PATH="$HOME/.cargo/bin:$PATH"
rustup toolchain install nightly -c rustfmt,clippy,rust-src
Install LLVM
LLVM 11 or later must be installed. Linux package managers should provide a recent enough release.
dnf
based OS:
apt
based OS:
Install Protobuf Compiler
For further detailed instructions, see protoc.
dnf
based OS:
apt
based OS:
Install GO protobuf Compiler Extensions
See Quick Start Guide for gRPC in Go for installation instructions.
Local libbpf
Checkout a local copy of libbpf.
Install perl
Install perl
:
dnf
based OS:
apt
based OS: