This commit is contained in:
2026-02-26 20:12:25 +01:00
parent 4318927060
commit 86d0f93ede
9 changed files with 576 additions and 758 deletions
+5
View File
@@ -78,15 +78,18 @@ LanSpread follows a layered, modular architecture with clear separation of conce
The project is organized as a Cargo workspace with 7 crates:
**Foundation Layer:**
- **lanspread-utils**: Utility macros and helpers used across all crates
- **lanspread-db**: Core data structures (`Game`, `GameFileDescription`, game metadata)
**Protocol & Communication:**
- **lanspread-proto**: P2P communication protocol definitions
- Message types: `Request` (Ping, ListGames, GetGame, etc.), `Response`, `Message` trait
- Serialization: JSON with `serde`
**Network Discovery & Compatibility:**
- **lanspread-mdns**: mDNS service discovery and advertisement
- Advertises and discovers "_lanspread._udp.local." services on LAN
- Uses `mdns-sd` crate
@@ -96,6 +99,7 @@ The project is organized as a Cargo workspace with 7 crates:
- Converts `EtiGame` structs to modern `Game` struct
**Core P2P Engine:**
- **lanspread-peer**: Central orchestration for all P2P functionality
- Entry point: `start_peer()` in `lib.rs`
- Communicates via unbounded channels (`PeerEvent`, `PeerCommand`)
@@ -108,6 +112,7 @@ The project is organized as a Cargo workspace with 7 crates:
- `path_validation.rs`: Security for file operations
**Application Layer:**
- **lanspread-tauri-deno-ts**: Tauri desktop application
- Binary + Library crate for the UI layer
- IPC commands: `request_games`, `install_game`, etc.