Net-Flow

Net Flow Logo # πŸ“Š Net Flow **Real-Time Network Bandwidth Telemetry & Native Windows 11 Widget** *Built in pure Rust for maximum performance, buttery-smooth fluid waveforms, and near-zero resource footprint.* [![CI](https://img.shields.io/badge/CI-Passing-brightgreen?logo=github-actions&logoColor=white)](https://github.com/rockerrishabh/net-flow/actions/workflows/ci.yml) [![Version](https://img.shields.io/badge/Version-0.1.0-blue?logo=windows&logoColor=white)](CHANGELOG.md) [![Microsoft Store](https://img.shields.io/badge/Microsoft%20Store-9PCR54NGJ94J-0078D4?logo=microsoftstore&logoColor=white)](ms-windows-store://pdp/?productid=9PCR54NGJ94J) [![Platform](https://img.shields.io/badge/Platform-Windows%2011-0078D4?logo=windows11&logoColor=white)](https://www.microsoft.com/windows) [![Rust](https://img.shields.io/badge/Language-Rust%202024-DEA584?logo=rust&logoColor=white)](https://www.rust-lang.org/) [![License: MIT OR Apache-2.0](https://img.shields.io/badge/License-MIT%20OR%20Apache--2.0-blue.svg)](#-license)

✨ Highlights


πŸ“₯ Installation

Net Flow is available directly through the Microsoft Store with seamless background updates:

πŸ‘‰ Get Net Flow on the Microsoft Store (Product ID: 9PCR54NGJ94J)

2. Local Developer Sideloading

If building from source or testing modifications locally:

# Clone the repository
git clone https://github.com/rockerrishabh/net-flow.git
cd net-flow

# One-command build, packaging, self-signing, and sideload registration
powershell -ExecutionPolicy Bypass -File scripts/setup_msix.ps1

Once installed:

  1. Press Win + W to open the Windows Widgets Board.
  2. Click + (Add Widgets) in the top-right corner.
  3. Select Net Flow and pin your preferred size (Small, Medium, or Large).

3. Portable Archive

Download the standalone net-flow-windows-x64.zip directly from GitHub Releases.


⚑ Performance & Architectural Hardening

Net Flow is engineered from the ground up for zero distraction, extreme reliability, and minimal system impact:

Metric / Component Implementation Impact
Release Binary Size Link-Time Optimization (lto = true, strip = true, codegen-units = 1) 1.24 MB standalone executable
CPU Utilization Direct Win32 IP Helper polling (GetIfTable2) & diffing < 0.1% CPU during active monitoring
Memory Footprint Bounded caches & in-memory rasterization < 15 MB working set
Process Sampling Decoupled 1.0s process inspection + 500ms network throughput polling Zero system scheduler jitter or scaling distortion
COM Lifetime Automatic idle detection with 30s grace period and CoRevokeClassObject Zero zombie background processes when unpinned
Lock Poison-Safety Poison-recovering extension traits (lock_safe, read_safe, write_safe) Fault-tolerant under panic = "abort"
Log Management Thread-safe 1MB rotating logger in %TEMP% Prevents disk bloat; quiet by default

πŸ”’ Privacy & Permissions (Why β€œPrecise Location”?)

When running Net Flow, Windows 11 may show Net Flow under Settings β†’ Privacy & security β†’ Location or briefly show the taskbar location icon.

Why Does Windows Flag This?

  1. Friendly Wi-Fi Name: In the card header, Net Flow displays the name of your active Wi-Fi network (e.g. Home-5G instead of generic Wi-Fi).
  2. The Win32 Wi-Fi API: To read that SSID, Net Flow queries the Windows Native Wi-Fi API (wlanapi.dll via WlanQueryInterface).
  3. Microsoft’s Privacy Grouping: Because nearby Wi-Fi network names (SSIDs and BSSIDs) can theoretically be cross-referenced against global Wi-Fi positioning databases to estimate a device’s physical location, Windows 10/11 classifies all native Wi-Fi scanning and query APIs under the β€œPrecise Location” permission toggle.

Our Privacy Guarantee

πŸ“– For complete details, see our Privacy Policy (PRIVACY.md).


πŸ—οΈ Architecture

Net Flow is structured as a modular, high-performance Rust workspace:

net-flow/
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       β”œβ”€β”€ ci.yml                     # Continuous integration & MSIX packaging validation
β”‚       └── publish.yml                # Release pipeline & Microsoft Store submission
β”œβ”€β”€ crates/
β”‚   └── core/                          # net-flow-core (pure Rust core logic)
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ backend.rs             # IP Helper polling, delta computing & interface classification
β”‚       β”‚   β”œβ”€β”€ card.rs                # Adaptive Cards v1.6 JSON builders & templates
β”‚       β”‚   β”œβ”€β”€ chart.rs               # In-memory dual-stream waveform rasteriser
β”‚       β”‚   β”œβ”€β”€ format.rs              # Bandwidth scaling & humanized unit formatting
β”‚       β”‚   β”œβ”€β”€ icons.rs               # Embedded vector glyphs (PNG data URIs)
β”‚       β”‚   └── process.rs             # Active process network attribution & bounded icon cache
β”œβ”€β”€ widget/                            # net-flow (Windows App SDK COM widget provider)
β”‚   β”œβ”€β”€ Assets/                        # Master branding, high-DPI logos, app.ico, and favicon pack
β”‚   β”‚   β”œβ”€β”€ MasterLogo.png             # 816x816 high-res squircle master logo
β”‚   β”‚   β”œβ”€β”€ Square150x150Logo.png      # 300x300 Windows tile logo
β”‚   β”‚   β”œβ”€β”€ Square44x44Logo.png        # 88x88 widget header & provider logo
β”‚   β”‚   β”œβ”€β”€ StoreLogo.png              # 100x100 Microsoft Store logo
β”‚   β”‚   β”œβ”€β”€ app.ico                    # Multi-res Windows executable icon (256, 128, 64, 48, 32, 16)
β”‚   β”‚   └── favicon.ico                # Web & docs favicon suite (48, 32, 16)
β”‚   β”œβ”€β”€ Package.appxmanifest           # Open-source generic manifest template
β”‚   β”œβ”€β”€ build.rs                       # Resource compilation & icon embedding
β”‚   └── src/
β”‚       β”œβ”€β”€ bindings.rs                # Windows App SDK WinMD bindings
β”‚       β”œβ”€β”€ factory.rs                 # Out-of-proc COM ClassFactory implementation
β”‚       β”œβ”€β”€ main.rs                    # WinMain entry point, COM lifecycle & idle shutdown
β”‚       └── provider.rs                # IWidgetProvider2 handler with poison-resilient locks
β”œβ”€β”€ scripts/
β”‚   └── setup_msix.ps1                 # Local developer build, test-signing & sideloading
β”œβ”€β”€ Cargo.toml                         # Workspace manifest & LTO release profile
β”œβ”€β”€ CHANGELOG.md                       # Release notes & version history
β”œβ”€β”€ CODE_OF_CONDUCT.md                 # Contributor Covenant v2.1
β”œβ”€β”€ CONTRIBUTING.md                     # Contributor guide & developer workflow
β”œβ”€β”€ LICENSE-APACHE                     # Apache 2.0 License
β”œβ”€β”€ LICENSE-MIT                        # MIT License
β”œβ”€β”€ PRIVACY.md                         # Store-ready Privacy Statement & location disclosure
└── SECURITY.md                        # Security policy & vulnerability reporting

πŸ§ͺ Testing & Verification

Run all 75 workspace unit tests:

cargo test --workspace

Run Clippy with strict zero-warnings enforcement:

cargo clippy --workspace --all-targets --all-features -- -D warnings

Build the optimized release binary (1.24 MB):

cargo build --release --workspace

πŸ“¦ CI/CD & Microsoft Store Publishing

Net Flow includes automated GitHub Actions workflows:

  1. ci.yml: Runs on every push and pull request. Validates formatting, executes all 75 unit tests, and verifies MSIX layout packaging.
  2. publish.yml: Triggered on Git tags (e.g. v0.1.0) or manual workflow dispatch. Builds the optimized binary, injects Partner Center secrets into the manifest, packages the MSIX, publishes GitHub Releases, and submits the update to the Microsoft Store via the Store Submission API.

πŸ‘€ Author & Maintainer

Net Flow is an independent open-source project created and actively maintained by:


πŸ“œ Documentation


πŸ“„ License

This project is dual-licensed under either of:

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Net Flow by you shall be dual-licensed as above, without any additional terms or conditions.