Go BSD-3-Clause

cbpfc

cBPF to C or eBPF compiler

C

cloudflare

Dernière activité 1 sept. 2026
cloudflare/cbpfc

217

étoiles

31

forks

2

issues ouvertes

Ce README est souvent en anglais.

cbpfc

GoDoc

cbpfc is a classic BPF (cBPF) to extended BPF (eBPF) compiler. It can compile cBPF to eBPF, or to C, and the generated code should be accepted by the kernel verifier.

cbpfc/clang is a simple clang wrapper for compiling C to eBPF.

Tests

Dependencies

  • clang
    • Path can be set via environment variable $CLANG

Unprivileged

  • go test -short

Full

  • Requires:

    • root or CAP_SYS_ADMIN to load XDP programs
    • Recent (4.14+) Linux kernel
  • sudo go test

Projets similaires

Write your BPF programs in Go, not C. gobee transpiles a Go subset to BPF C and generates typed cilium/ebpf bindings.

Gobpfcilium-ebpfebpf
Bboratanrikulu
348 étoiles4

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.

Gobtfebpfgo
Ccilium
8 k étoiles893

eBPF implementation that runs on top of Windows

C
Mmicrosoft
3,6 k étoiles310