drewkett / bpf-script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bpf-script

Build Status crates.io mio Lines of Code

A small scripting language and compiler for creating eBPF programs at runtime.

The motive behind this crate and sister crates: btf, btf-derive, bpf-ins, and bpf-api, aside from learning more about eBPF, was to be able to have a fully Rust eBPF solution. That is, the ability to easily write, compile, and attach BPF programs and use maps without any dependencies on bcc, libbpf or any other non-Rust BPF dependencies.

Usage

For usage examples, see code located in examples/ :

Examples Description
print-instructions Compiles a short program and prints the generated instructions

TODO

  • Add control flow.
  • Remove anyhow / add proper errors.

About


Languages

Language:Rust 100.0%