# bpf-script
[](https://github.com/arcjustin/bpf-script/actions?query=workflow%3Abuild)
[](https://crates.io/crates/bpf-script)
[](https://docs.rs/bpf-script/)
[](https://tokei.rs/b1/github/arcjustin/bpf-script?category=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/) :
|[print-instructions](examples/print-instructions.rs)| Compiles a short program and prints the generated instructions|
## TODO
- Add control flow.
- Remove anyhow / add proper errors.