Skip to content

New package: rustnet-1.1.0#57605

Open
zen0bit wants to merge 1 commit intovoid-linux:masterfrom
oSoWoSo:rustnet
Open

New package: rustnet-1.1.0#57605
zen0bit wants to merge 1 commit intovoid-linux:masterfrom
oSoWoSo:rustnet

Conversation

@zen0bit
Copy link
Contributor

@zen0bit zen0bit commented Oct 19, 2025

Testing the changes

  • I tested the changes in this PR: yes

New package

Local build testing

  • I built this PR locally for my native architecture, x64 glibc

@tranzystorekk tranzystorekk added the new-package This PR adds a new package label Oct 19, 2025
@icp1994
Copy link
Member

icp1994 commented Oct 20, 2025

Isn't this practically same as bandwhich?

@zen0bit
Copy link
Contributor Author

zen0bit commented Dec 4, 2025

Isn't this practically same as bandwhich?

Asked upstream  

Reply:

TL;DR: I would say that RustNet focuses on WHAT is connecting and HOW (protocols, states). Where bandwhich focuses on HOW MUCH (bandwidth tracking).
AFAICT this might be a way to compare them but if something is not right please let me know.

RustNet bandwhich
Focus Connection states & protocol detection Bandwidth utilization
DPI Yes (HTTP, HTTPS/SNI, QUIC, DNS, SSH) No
Process ID eBPF (Linux), PKTAP (macOS), WinApi /proc, lsof, WinApi
Filtering Yes (port/process/SNI/state) No
Raw output No Yes (--raw)
Cumulative stats No Yes (--total-utilization)
Platforms Linux, macOS, Windows, FreeBSD Linux, macOS, Windows, Android
Status Active development Passive maintenance AFAIK

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Mar 5, 2026
@zen0bit zen0bit force-pushed the rustnet branch 5 times, most recently from 426cf05 to af88e15 Compare March 8, 2026 05:53
@github-actions github-actions bot removed the Stale label Mar 9, 2026
@zen0bit zen0bit changed the title New package: rustnet-0.14.0 New package: rustnet-1.0.0 Mar 11, 2026
@icp1994
Copy link
Member

icp1994 commented Mar 15, 2026

I want to merge, can you try building on aarch64 once? bpftrace works with it, at least according to its template.

@icp1994
Copy link
Member

icp1994 commented Mar 18, 2026

Looks fine, add the changelog and good to go

@zen0bit zen0bit changed the title New package: rustnet-1.0.0 New package: rustnet-1.1.0 Mar 18, 2026
@zen0bit
Copy link
Contributor Author

zen0bit commented Mar 18, 2026

@icp1994 Good to go

@Duncaen
Copy link
Member

Duncaen commented Mar 18, 2026

diff --git a/srcpkgs/rustnet/template b/srcpkgs/rustnet/template
index fc2bd6ad4a4..2b29506404b 100644
--- a/srcpkgs/rustnet/template
+++ b/srcpkgs/rustnet/template
@@ -5,8 +5,8 @@ revision=1
 archs="x86_64* aarch64*"
 build_style=cargo
 make_check_args="-- --skip test_ebpf"
-hostmakedepends="pkg-config"
-makedepends="libpcap-devel"
+hostmakedepends="pkg-config clang elfutils-devel"
+makedepends="libpcap-devel elfutils-devel zlib-devel"
 short_desc="Cross-platform network monitoring terminal UI tool built with Rust"
 maintainer="zenobit <zenobit@disroot.org>"
 license="Apache-2.0"
@@ -15,13 +15,22 @@ changelog="https://raw.githubusercontent.com/domcyrus/rustnet/refs/heads/main/CH
 distfiles="https://github.com/domcyrus/rustnet/archive/refs/tags/v${version}.tar.gz"
 checksum=a91773ea19848bcd75339d21b1a811944ef2490feaf8602d5cee6064f4d96ff2
 
-case "$XBPS_TARGET_MACHINE" in
-	aarch64*)
-		# Build in procfs-only mode; eBPF cross-compilation not supported
-		configure_args="--no-default-features"
-		;;
-	*)
-		hostmakedepends+=" clang19 elfutils-devel"
-		makedepends+=" elfutils-devel zlib-devel"
-		;;
-esac
+_setup_env() {
+	# workaround the cc-rs mixing CFLAGS for host and target.
+	# https://github.com/rust-lang/cc-rs/issues/1469
+	export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}" \
+		   CXXFLAGS_${RUST_BUILD//-/_}="${CXXFLAGS_host}" \
+		   LDFLAGS_${RUST_BUILD//-/_}="${LDFLAGS_host}" \
+		   CFLAGS_${RUST_TARGET//-/_}="${CFLAGS}" \
+		   CXXFLAGS_${RUST_TARGET//-/_}="${CXXFLAGS}" \
+		   LDFLAGS_${RUST_TARGET//-/_}="${LDFLAGS}" \
+		   CFLAGS="" CXXFLAGS="" LDFLAGS=""
+}
+
+pre_build() {
+	_setup_env
+}
+
+pre_install() {
+	_setup_env
+}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package This PR adds a new package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants