Schedule

Uchio KONDO
Uchio KONDO
@udzura
A Plain-Old Rubyist, ex-local organizer of RubyKaigi 2019. Creator of Haconiwa, RbBCC and Purua. Lives in Fukuoka - the "coast" city of "west" Japan, works at GMO Pepabo, Inc. as a DataOps/Dev Productivity Engineer. Interests: Systems Programming, Linux Kernel, Containers, Rust and mruby. Big fan of Duolingo (:es: :fi: :ko: :zh: learner, diamond leaguer), Zumba freak.
EN
Story of Rucy - How to "compile" a BPF binary from Ruby

BPF is a technology used in Linux for packet filtering, tracing or access auditing. BPF has its own VM and set of opcodes.

If you want to write a program that loads and uses BPF binary, you can write it in any language including Ruby.

However, to prepare a "BPF binary" itself, you generally need to write a bit weird C, and pass it to clang compiler using bpf target.

Wouldn't it be great if we could make these BPF binaries entirely in Ruby?

Rucy is intended to allow programmers to write their whole BPF programs in Ruby. I'll discuss how to "compile" BPF binaries from Ruby in this talk.

Presentation Material

Recorded video