ebpfapp
To develop in visual studio code
- Run
vagrant up
to boot a VM with BPF enabled in the kernel. - Run
vagrant ssh-config > .vagrant_ssh_config
to generate an ssh config. - Open the ssh config in vscode, following these instructions.
- Open
/vagrant
folder in the remote vsCode. - Run the code
cargo xtask build-ebpf && cargo build && cargo xtask run
in the remote vsCode terminal.
Prerequisites
- Install a rust stable toolchain:
rustup install stable
- Install a rust nightly toolchain:
rustup install nightly
- 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