A peer-to-peer mesh network chat application written in Rust that allows users to communicate in a decentralized manner.
- Peer-to-peer communication without a central server
- Automatic peer discovery using UDP broadcast
- Real-time messaging between connected peers
- Command-line interface
- Built with async Rust using Tokio
- Rust 2021 edition or later
- Cargo package manager
Clone the repository and build the project:
git clone https://github.com/yourusername/mesh-talk.git
cd mesh-talk
cargo build --releaseRun the application with your desired name and port:
cargo run -- --name YourName --port 8000--nameor-n: Your display name in the chat--portor-p: The TCP port to listen on for incoming connections
- The application creates a mesh network where each node can communicate directly with other nodes
- UDP broadcast is used for peer discovery on port 8888
- TCP connections are established between peers for reliable message delivery
- Messages are broadcast to all connected peers in the network
- Uses Tokio for async runtime and networking
- Implements UDP broadcast for peer discovery
- TCP for reliable peer-to-peer communication
- JSON serialization for message encoding
- Thread-safe peer management using Arc and Mutex
- tokio: Async runtime and networking
- serde: Serialization framework
- serde_json: JSON serialization
- clap: Command line argument parsing
This project is open source and available under the MIT License.