Skip to content
Open

v3 #94

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
4 changes: 3 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
sudo update-alternatives --set llvm-strip /usr/lib/llvm-21/bin/llvm-strip
- name: Install musl target
run: rustup target add x86_64-unknown-linux-musl
- name: Run tests
run: cargo test --verbose
- name: Build
run: |
cargo build --release --target x86_64-unknown-linux-musl
Expand All @@ -42,4 +44,4 @@ jobs:
with:
archive: false
name: minecraft_filter.o
path: ./c/minecraft_filter.o
path: ./xdp/minecraft_filter.o
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ target/
*.tmp
*.swp

# Generated at runtime on first launch
config.toml

# System files
.DS_Store
Thumbs.db
245 changes: 91 additions & 154 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@ name = "xdp-loader"
version = "0.1.0"
edition = "2024"

# userspace loader lives in loader/ instead of the default src/
[[bin]]
name = "xdp-loader"
path = "loader/main.rs"

[dependencies]
aya = "0.13.1"
log = "0.4.32"
signal-hook = "0.4.4"
anyhow = "1.0.102"
prometheus = "0.14"
lazy_static = "1.4"
# only the text encoder is used, default features would pull in protobuf
prometheus = { version = "0.14", default-features = false }
tiny_http = "0.12"
fern = { version = "0.7", features = ["colored"] }
colored = "3.1"
chrono = "0.4"
file-rotate = "0.8"
clap = { version = "4.6", features = ["derive"] }
serde = { version = "1.0.228", features = ["derive"] }
toml = "1.1.2"

[profile.release]
opt-level = 3
# the packet hot path lives in the kernel; the loader itself is not
# performance sensitive, so optimize it for size
opt-level = "z"
lto = "fat"
codegen-units = 1
panic = "abort"
Expand Down
Loading