Earlier quoted context omitted.
Well, it's posted on Hacker News which is a general audience including people working on electrical/signal/audio/radio-frequency systems among other things (not just low-level network code) where BPF has a different meaning, so I think disambiguation is appropriate.
> Well, it's posted on Hacker News which is a general audience including people working on electrical/signal/audio/RF systems among other things (not just low-level network code) where BPF has a different meaning, so I think disambiguation is appropriate. And it's been explained on HN exactly what it is. So problem solved. By the way, I noticed you didn't follow your own recommendation for the "RF" acronym in your co…
Show HN: Write your BPF programs in Go, not C
21–30 of 58 posts
Re: Show HN: Write your BPF programs in Go, not C
#22> gc, the Go compiler, has no LLVM-based BPF backend. Adding one is a multi-year compiler project. rustc is built on LLVM and that's why Aya works. So gobee emits C and reuses clang's BPF backend, which gives us mature codegen, BTF, and CO-RE relocations for free.
I wonder if TinyGo (https://tinygo.org/) might be a better fit here:
> TinyGo brings the Go programming language to embedded systems and to the modern web by creating a new compiler based on LLVM.
I've not played with TinyGo much so would be interested to hear other peoples experiences.
Re: Show HN: Write your BPF programs in Go, not C
#23Re: Show HN: Write your BPF programs in Go, not C
#24In eBPF-land you're going to be calling C functions in the kernel, and using (generally) C data types like structs and null-terminated strings. You can't do loops (loops are unrolled by the compiler), you can't do variadic functions, and you definitely can't take advantage of all the cool Go stuff like goroutines, select, context, etc. I'm not really sure why you'd want to use this. If you're writing eBPF, you alread…
I agree though, I think it makes more sense just to write the C code. The hard part of eBPF isn't writing the code; it's getting it past the verifier.
Re: Show HN: Write your BPF programs in Go, not C
#25Re: Show HN: Write your BPF programs in Go, not C
#26I'm primarily a Go developer and love the language and will defend it for most use-cases, but to be honest BPF seems like Rust's place to shine.
Re: Show HN: Write your BPF programs in Go, not C
#27I'm primarily a Go developer and love the language and will defend it for most use-cases, but to be honest BPF seems like Rust's place to shine.
Re: Show HN: Write your BPF programs in Go, not C
#28Re: Show HN: Write your BPF programs in Go, not C
#29I'm primarily a Go developer and love the language and will defend it for most use-cases, but to be honest BPF seems like Rust's place to shine.
Re: Show HN: Write your BPF programs in Go, not C
#30> Why transpile, not generate BPF directly > gc, the Go compiler, has no LLVM-based BPF backend. Adding one is a multi-year compiler project. rustc is built on LLVM and that's why Aya works. So gobee emits C and reuses clang's BPF backend, which gives us mature codegen, BTF, and CO-RE relocations for free. I wonder if TinyGo ( https://tinygo.org/ ) might be a better fit here: > TinyGo brings the Go programming langua…
[1] https://github.com/mickael-kerjean/filestash/blob/master/ser...