1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! # 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
//! [`TestEvent`]s so any front-end can render it.
//!
//! ## Quick start
//!
//! ```no_run
//! use netrunner_core::{SpeedTest, TestConfig};
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! 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);
//! # Ok(())
//! # }
//! ```
// Convenience re-exports — the public surface most consumers need.
pub use NetworkDiagnosticsTool;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;