A simple client-server chat application built in Rust, using Slint for the GUI.
This project is a basic chat application used to learn how to build a real-time messaging system in Rust. It consists of:
- A server that handles message routing and communication between clients
- A client with a GUI built using the Slint toolkit
- Shared components (in a
commonfolder) for data models and protocol definitions.
- Real-time messaging between multiple clients
- Simple user interface
- Modular architecture: clear separation between client, server, and shared logic
- Cross-platform (Rust + Slint)
- Server: Listens for client connections, forwards messages, and manages connected users
- Client: GUI application using Slint for the interface, communicates with the server
- Common: Shared Rust code (e.g. message types, encoding, decoding) used by both client and server
- Rust (with
cargo) - (Optional) Slint toolchain for GUI development
- Clone the repository:
git clone https://github.com/DanielGrotan/chat-app.git
cd chat-app- Build the project:
cargo buildcargo run --release -p serverThis will start the chat server and listen for incoming client connections on localhost:8080.
In a separate terminal/window:
cargo run --release -p clientThis will launch the GUI chat client.
- Open multiple clients to simulate chat between users
- Enter the server address (e.g.
localhost:8080), username, and start sending messages
-
Rust — core programming language
rust-lang.org -
Slint — declarative GUI toolkit for Rust
slint.dev -
tokio — asynchronous runtime for networking crates.io
-
bincode — binary serialization for Rust
crates.io