2 ms·
Oh, no I don't mean that arbitrary Go compiles to eBPF. Apologies if I gave that impression. I meant that there are libraries that let you compose eBPF programs
by ants_everywhere 3y ago
Oh, no I don't mean that arbitrary Go compiles to eBPF. Apologies if I gave that impression. I meant that there are libraries that let you compose eBPF programs in other languages. But you're still putting together an eBPF program, just like you can assemble JSON with Go but you can't compile an arbitrary Go program to JSON.
Cilium's eBPF library is the Go one I had in mind: https://github.com/cilium/ebpf https://github.com/cilium/ebpf
Here's an example from that repo: https://github.com/cilium/ebpf/tree/main/examples/ringbuffer https://github.com/cilium/ebpf/tree/main/examples/ringbuffer