Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from aya-rs to libbpf-rs #47

Open
wqld opened this issue Aug 24, 2024 · 0 comments
Open

Migrate from aya-rs to libbpf-rs #47

wqld opened this issue Aug 24, 2024 · 0 comments
Assignees

Comments

@wqld
Copy link
Owner

wqld commented Aug 24, 2024

aya-rs makes it easy to write eBPF programs in Rust, but the dependencies required to dynamically compile and load BPF programs into the kernel while the sinabro agent is running, as the method used by Cilium, seems too heavy.

Using libbpf-rs is expected to recolve this issue.

https://github.com/libbpf/libbpf-rs/blob/master/libbpf-cargo/src/build.rs#L167

/// We're essentially going to run:
///
///   clang -g -O2 -target bpf -c -D__TARGET_ARCH_$(ARCH) runqslower.bpf.c -o runqslower.bpf.o
///
/// for each prog.
fn compile_one(
@wqld wqld self-assigned this Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant