Chat application with Rust using Ratatui for TUI interface.
# Terminal 1 - Servidor
cargo run --bin chat-serverYou may see:
INFO rusty_chat_server: Rusty Chat Server started
INFO rusty_chat_server: Listening on 0.0.0.0:4556
# Terminal 2 - Cliente
cargo run --bin chat-tui
# Or from chat-tui directory
cd chat-tui
cargo run- Enter your username
- Press
Tabto navigate between fields - Press
Enteron the "Connect" button to connect
Keyboard Controls:
i- Enter editing mode (to type messages)ESC- Exit editing modeEnter- Send message (in editing mode)n- Next roomp- Previous room↑/↓- Scroll messagesq- Quit (in normal mode)Ctrl+C- Force quit (any time)
While in chat, you can use these commands:
/join <room>- Join a room/rooms- List available rooms/users- List users in current room/whisper <user> <message>- Send private message/help- Show help/quit- Disconnect
# Build everything
cargo build
# Build only server
cargo build --bin chat-server
# Build only TUI
cargo build --bin chat-tui# Run all tests
cargo test
# Test specific package
cargo test -p chat-core
cargo test -p chat-tuiServer logs are sent to stderr and won't interfere with the TUI.
To see server logs:
cargo run --bin chat-server 2> server.logCause: Server not running
Solution: Try initializing the server (chat-server) first:
# Terminal 1
cargo run --bin chat-server
# Terminal 2 (depois que o servidor iniciar)
cargo run --bin chat-tuiSolution: Kill the process which is using this port:
netstat -ano | findstr 4556
taskkill /F /PID <PID>Try contacting me via github or my social medias and I can try helping you.
- chat-core: Pure server logic, no terminal output
- chat-tui: TUI client using Ratatui, connects to server via TCP
- Both use async/await with Tokio
- Messages are parsed from server responses