From c32d3774885e789b04b6d430125329c552b1af42 Mon Sep 17 00:00:00 2001 From: nutcas3 Date: Thu, 23 Apr 2026 03:00:58 +0300 Subject: [PATCH] feat: Add build script for eBPF program compilation with cargo build-bpf integration - Add build.rs with Command execution for cargo build-bpf --release - Add status check with panic on build failure for eBPF program compilation --- apps/packet-gateway/build.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 apps/packet-gateway/build.rs diff --git a/apps/packet-gateway/build.rs b/apps/packet-gateway/build.rs new file mode 100644 index 0000000..09081fa --- /dev/null +++ b/apps/packet-gateway/build.rs @@ -0,0 +1,13 @@ +use std::process::Command; + +fn main() { + // Build the eBPF program + let status = Command::new("cargo") + .args(&["build-bpf", "--release"]) + .status() + .expect("Failed to execute cargo build-bpf"); + + if !status.success() { + panic!("Failed to build eBPF program"); + } +}