Перейти к основному содержимому

1 запись с тегом "eBPF"

Посмотреть все теги

↗ Building Linux eBPF/XDP Applications on macOS with Colima, Docker, Clang, and Go

· 17 мин. чтения
Yevgeniy Goncharov
Maintainer of OpenBLD.net

Building Linux eBPF/XDP Applications on macOS

eBPF and XDP are increasingly used for network traffic filtering, observability, abuse protection, and performing extremely cheap packet inspections before traffic reaches the regular Linux networking stack.

There is one practical problem, though: if your primary workstation is a Mac — especially an Apple Silicon Mac — you cannot build and test Linux eBPF programs exactly the same way you build a normal Go application.

For a reproducible build environment, we need:

  • Go
  • Clang and LLVM
  • Linux headers
  • libbpf headers
  • bpf2go
  • Docker
  • a Linux runtime provided by Colima