A pure Go library for loading, compiling, debugging, and attaching eBPF programs to Linux kernel hooks.
ebpf-go is a pure Go library for working with eBPF (extended Berkeley Packet Filter) programs. It provides utilities for loading, compiling, debugging, and attaching eBPF programs to various hooks in the Linux kernel, enabling developers to build low-level observability, networking, and security tools directly in Go.
Go developers and system engineers who need to interact with eBPF for observability, networking, or security applications, particularly those building long-running processes that require minimal external dependencies.
Developers choose ebpf-go because it offers a pure Go implementation with minimal dependencies, making it easy to integrate into existing Go projects. It provides comprehensive eBPF functionality, including compilation, assembly, and kernel attachment, without requiring external tools or complex setups.
ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Minimal external dependencies and designed for long-running processes, making it easy to integrate into existing Go ecosystems without complex toolchains.
Includes cmd/bpf2go for compiling and embedding C-based eBPF programs directly into Go code, streamlining the build and deployment workflow.
Provides a features package equivalent to bpftool feature probe, enabling native Go discovery of BPF-related kernel capabilities without external tools.
Offers link package for attaching eBPF programs to various kernel hooks, along with perf and ringbuf packages for efficient data reading from maps.
Only fully supports amd64 and arm64 on Linux >=4.4 (EOL versions unsupported), with 32-bit architectures not supported and Windows support tied to latest releases, restricting deployment flexibility.
Requires deep knowledge of eBPF and kernel internals; the library provides low-level utilities but doesn't abstract away the complexity, making it challenging for newcomers.
Focuses on foundational eBPF operations; teams needing pre-built observability or networking components must implement custom logic, increasing development time.