Expand description
§netrunner-core
Framework-free internet speed-test and network-diagnostics engine shared by
the netrunner_cli (Ratatui TUI) and netrunner (Zed GPUI desktop) apps,
and usable as a standalone library.
| Module | What lives here |
|---|---|
types | Domain models — results, servers, config, quality ratings, diagnostics |
speed_test | Geolocation, server discovery/selection, throughput & latency measurement (SpeedTest) |
diagnostics | Gateway/DNS/route/IPv6 network diagnostics (NetworkDiagnosticsTool) |
history | Embedded redb history storage & statistics (HistoryStorage) |
events | UI-agnostic progress events (TestEvent) streamed over a channel |
This crate has no GUI or TUI dependencies. Progress is reported through
TestEvents so any front-end can render it.
§Quick start
use netrunner_core::{SpeedTest, TestConfig};
let test = SpeedTest::new(TestConfig::default())?;
let result = test.run_full_test().await?;
println!("{:.1} Mbps down / {:.1} Mbps up", result.download_mbps, result.upload_mbps);Re-exports§
pub use diagnostics::NetworkDiagnosticsTool;pub use events::emit;pub use events::EventSender;pub use events::Phase;pub use events::SelectedServer;pub use events::TestEvent;pub use history::DbStats;pub use history::HistoryStorage;pub use history::SpeedTrends;pub use history::TestStatistics;pub use presentation::palette;pub use presentation::quality_rgb;pub use speed_test::GeoLocation;pub use speed_test::SpeedTest;pub use types::ConnectionQuality;pub use types::DetailLevel;pub use types::NetworkDiagnostics;pub use types::RouteHop;pub use types::ServerCapabilities;pub use types::ServerProvider;pub use types::SpeedTestResult;pub use types::TestConfig;pub use types::TestServer;
Modules§
- diagnostics
- Network diagnostics engine (UI-agnostic).
- events
- UI-agnostic progress events emitted by the speed-test and diagnostics engines.
- history
- History Storage - Using Redb Embedded Database
- presentation
- Shared, UI-agnostic presentation helpers.
- speed_
test - Speed Test Module
- types
Macros§
- quality_
color_ fn - Generate a function mapping
ConnectionQualityto a front-end colour type.