Skip to content
Open
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
46 changes: 46 additions & 0 deletions net/rustnet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=rustnet
PKG_VERSION:=1.5.0
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/domcyrus/rustnet/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=f6425992dc5a8a700323c1231d1833a135cd93424d86cfaa788eed6cb700fe33

PKG_MAINTAINER:=Jonir Rings <i@jonirrings.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE

PKG_BUILD_DEPENDS:=rust/host bpf-headers bpftool/host
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/bpf.mk
include ../../lang/rust/rust-package.mk

define Package/rustnet
SECTION:=net
CATEGORY:=Network
TITLE:=Per-process network monitor with DPI
URL:=https://github.com/domcyrus/rustnet
# You need enable KERNEL_DEBUG_INFO_BTF and KERNEL_BPF_EVENTS
DEPENDS:=@(aarch64||x86_64||riscv64) $(BPF_DEPENDS) +libpcap +libcap +libelf

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this arch list built? based on history tests this program builds on arm as well.
any tests on loongarch64/mips64?

I'd prefer using $(RUST_ARCH_DEPENDS) with @!(i386||mips||mipsel||powerpc)

@jonirrings jonirrings Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on openwrt PR at the same time. from feedback on that side, this package is better to be limited to aarch64/x86_64.
I've tested on my riscv64 dev board, VisionFive2 with ubuntu 26.04, it works, but not well, ebpf CO-RE load failed.

from the rustnet release, only armhf/aarch64/amd64 linux are supported,

so, I'd like to limit arch to arch64/arm/x86_64 for the time being,
what is your suggestion?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, I'd like to limit arch to arch64/arm/x86_64 for the time being

Sounds make sense

endef

define Package/rustnet/description
A terminal-based, per-process network monitoring tool with deep
packet inspection. Maps TCP, UDP, and QUIC connections to owning
processes using eBPF (Linux), PKTAP (macOS), or native APIs,
with DPI for HTTP, TLS/SNI, DNS, SSH, QUIC, and many other protocols.
Supports exporting annotated PCAPNG files with process metadata
and GeoIP enrichment.
endef

define Package/rustnet/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/rustnet $(1)/usr/bin
endef

$(eval $(call RustBinPackage,rustnet))
$(eval $(call BuildPackage,rustnet))
Loading