/ebpf

Primary LanguageRust

ebpfapp

To develop in visual studio code

  1. Run vagrant up to boot a VM with BPF enabled in the kernel.
  2. Run vagrant ssh-config > .vagrant_ssh_config to generate an ssh config.
  3. Open the ssh config in vscode, following these instructions.
  4. Open /vagrant folder in the remote vsCode.
  5. Run the code cargo xtask build-ebpf && cargo build && cargo xtask run in the remote vsCode terminal.

Prerequisites

  1. Install a rust stable toolchain: rustup install stable
  2. Install a rust nightly toolchain: rustup install nightly
  3. Install bpf-linker: cargo install bpf-linker

Build eBPF

cargo xtask build-ebpf

To perform a release build you can use the --release flag. You may also change the target architecture with the --target flag

Build Userspace

cargo build

Run

cargo xtask run