3 ms·
Everyone seems to assume that eBPF program source is C. But LLVM is happy to generate code from IF produced from other languages, notably C++ and Rust. It would
by ncmncm 8y ago
Everyone seems to assume that eBPF program source is C. But LLVM is happy to generate code from IF produced from other languages, notably C++ and Rust. It would be unfortunate if BCC fails to make available improved ways to express eBPF programs.
People have asked me why anyone would code small program fragments like eBPF in C++. The short answer is that C++ enables better encapsulation of semantics, particularly those useful for a whole collection of eBPF program fragments. Once you find a use for eBPF in one place, you are likely to notice many other places.
Bcc (and maybe Bpftrace?) would be a good place to park C++ abstractions useful for any eBPF program fragment.
- monocasa 8y agoThere's been some good work on eBPF programs written in Rust at least. https://unhandledexpression.com/general/rust/2018/02/02/poc-compiling-to-ebpf-from-rust.html https://unhandledexpression.com/general/rust/2018/02/02/poc-...