Skip to content

Fix for #48 #49

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ curl -sSL https://capnproto.org/capnproto-c++-0.10.2.tar.gz | tar -zxf - \

## Build and Run

Build code that gets injected into eBPF:
```sh
CARGO_TARGET_DIR=target/bpf cargo +nightly-2022-10-10 rustc --package=bpf-recorder --bin=bpf-recorder-kern --features=kern --no-default-features --target=bpfel-unknown-none -Z build-std=core --release -- -Cdebuginfo=2 -Clink-arg=--disable-memory-builtins -Clink-arg=--keep-btf
```

After that, build `bpf-recorder` binary:
```sh
cargo build --bin bpf-recorder --release
```

Expand Down
2 changes: 2 additions & 0 deletions bpf-recorder/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ fn build_bpf() {
println!("cargo:rerun-if-changed=src/lib.rs");
println!("cargo:rerun-if-changed=src/context.rs");
println!("cargo:rerun-if-changed=src/send.rs");
// Since build is commented out above, if changes to that dir happen this script should be rerun
println!("cargo:rerun-if-changed={}", target_dir);
}