Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tyrone-wu/learning-ebpf-aya

Following the Learning eBPF O'Reilly book with the aya Rust library.
https://github.com/tyrone-wu/learning-ebpf-aya

Last synced: 11 days ago
JSON representation

Following the Learning eBPF O'Reilly book with the aya Rust library.

Awesome Lists containing this project

README

        

# learning-ebpf-aya

Following along [lizrice](https://github.com/lizrice)'s [Learning eBPF](https://www.amazon.com/Learning-eBPF-Programming-Observability-Networking/dp/1098135121).

repo reference: https://github.com/lizrice/learning-ebpf

### Prerequisites

1. Install bpf-linker: `cargo install bpf-linker`

### Build eBPF for Chapter

```bash
$ cargo build-ebpf
# Example: cargo build-ebpf 2
```

To perform a release build you can use the `--release` flag.
You may also change the target architecture with the `--target` flag.

### Build Userspace for Chapter

```bash
$ cargo build-us
# Example: cargo build-us 2
```

### Build eBPF & Userspace and Run Program

```bash
$ cargo br -c -p
# cargo br -c 2 -p hello
```

Programs can be found under:
```
.
├─...
└─chapterXX/
└─ebpf/
└─src/
├─main.rs
├─.rs
├─...
└─.rs
```

### Run Program

```bash
$ cargo r -c -p
# cargo r -c 2 -p hello
```