This workshop is prepared for "Cooking up TUIs with Ratatui" session at RustLab 2024.
You can also follow this guide individually and complete the workshop. See Getting Started.
A terminal chat application that supports sending messages, files, and images.
- Get familiar with the fundamentals of Ratatui.
- Learn how to incorporate widgets and structure your application.
- Understand the best practices of building TUI applications in Rust.
- Have fun!
- Introduction
- Initializing the project
- Initializing the TUI
- Server connection
- Message list
- Text input (w/
tui-textarea
) - Room list (w/
tui-tree-widget
) - Help popup
- File explorer (w/
ratatui-explorer
) - Image preview (w/
ratatui-image
) - Markdown preview (w/
tui-markdown
) - Terminal effects (w/
tachyonfx
) - Logging (w/
tui-logger
) - Testing (w/
insta
) - End
-
Rust (make sure you have the latest stable version installed).
-
A code editor with
rust-analyzer
plugin (or anything at your preference). -
A performant terminal with image rendering support (is good to have). We recommend
wezterm
.
Simply start by cloning this repository:
git clone https://github.com/orhun/rustlab2024-ratatui-workshop
Your job is to implement a terminal client for a chat application using Ratatui!
Click here to start the workshop! ➡️
Start reading through the chapters and sometimes you will be asked to implement some parts of the application. Don't worry, the solutions are also provided! :)
Let us know if you got stuck somewhere or if you think something is wrong!
You can also present this workshop at your local Rust meetup or conference!
There are minimal slides included in the presentation.md
file. You can use presenterm
to start the presentation:
presenterm -c config.yml presentation.md
Don't forget to tweet at us!
The client/server architecture is inspired by @pretzelhammer's chat server project.
Copyright © 2024, Orhun Parmaksız
Licensed under The MIT License
🦀 ノ( º _ º ノ) - respect crables!