|
||
---|---|---|
.. | ||
.devcontainer | ||
.idea | ||
.vscode | ||
comms | ||
server | ||
tui | ||
.gitignore | ||
Cargo.toml | ||
LICENSE | ||
README.md |
README.md
Rust Chat Server
This project serves as a learning exercise in Rust, Tokio, Channels, and TUI (Terminal User Interface) programming. It features a room-based chat server with a Terminal User Interface (TUI), utilizing technologies such as Tokio, Ratatui, and a Redux-inspired architecture.
Note: This project is not suitable for production use. It's designed strictly for educational purposes.
Setup Instructions
To get the project up and running, follow these steps:
- Clone the repository:
git clone git@github.com:Yengas/rust-chat-server.git
- Make sure you have Rust and Cargo installed.
- Change to the project directory:
cd rust-chat-server
- Start the server:
cargo run --bin server
- Launch one or more TUI instances:
cargo run --bin tui
Project Overview
The project utilizes Rust Workspaces to divide itself into three subprojects, each with its own README that details the concepts and architecture. Below is a brief overview:
- comms: This subproject houses a library crate that provides Events and Commands used for server-client communication. It also offers client/server socket utilities, enabled via feature flags, to assist in serializing and deserializing events and commands.
- server: Built on the Tokio Runtime and using Tokio Channels, this subproject implements a single-instance chat server that manages room states and user participation.
- tui: Leveraging Ratatui, this subproject implements a terminal-based user interface. Users can connect to a chat server, join rooms, and send/receive messages. The code follows a Redux-inspired structure to separate state management from TUI rendering.
License
The project is distributed under the MIT License.