Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/tyrone-wu/learning-ebpf-aya
- Owner: tyrone-wu
- Created: 2023-09-08T23:18:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-24T04:39:08.000Z (7 months ago)
- Last Synced: 2024-04-24T10:34:18.696Z (7 months ago)
- Language: Rust
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```