๐ฆ Tuiuiu.rs
Terminal UI Framework โ Rust Edition
Build beautiful, reactive terminal apps with blazing-fast performance. Zero dependencies โข Signal-based โข Flexbox layout โข Native speed โข Memory safe 50+ components. Pure Rust. No unsafe chaos. Maximum performance.
๐ Documentation ยท ๐ Quick Start ยท ๐ฆ Rust API ยท โก Performance
* Only libc for raw terminal mode
๐ Full Documentation: This is the Rust port of tuiuiu.js. For detailed concepts, architecture, component API, and design philosophy, see the JavaScript documentation โ the APIs are intentionally similar.
Quick Start
# Cargo.toml
[]
= "0.1"
use *;
What's Inside
| Category | Components |
|---|---|
| Core | Signals, Flexbox layout, Focus management, Event system |
| Primitives | Box, Text, Spacer, Newline, Fragment, Divider, Canvas |
| Atoms | Button, TextInput, Switch, Slider, Spinner, ProgressBar |
| Molecules | Select, MultiSelect, RadioGroup, Autocomplete, Table, Tabs, Tree, Calendar, CodeBlock, Markdown |
| Organisms | Modal, CommandPalette, DataTable, FileManager, SplitPanel |
| Templates | AppShell, Page, Header, StatusBar, VStack, HStack |
| Data Viz | BarChart, LineChart, Sparkline, Heatmap, Gauge |
Rust API
โก Signals
Fine-grained reactivity โ only what changes gets updated.
use *;
let = create_signal;
let doubled = create_memo;
create_effect;
set_count.set; // โ "Count: 5, Doubled: 10"
// Batch multiple updates
batch; // Only one render!
๐ฆ Flexbox Layout
CSS Flexbox model for terminals.
Boxnew
.flex_direction
.justify_content
.align_items
.gap
.padding
.border
.children
๐จ Components
use *;
// Select dropdown
new
.items
.selected
.build
// Table with columns
new
.columns
.rows
.build
// Tree view
new
.nodes
.build
// Calendar
new
.date
.selected
.today
.build
// Charts
new.data.build
new.value.max.label.build
โจ๏ธ Input Handling
// Keyboard
use_input;
// With modifiers
use_hotkeys;
// Mouse
use_mouse;
Feature Flags
Pick what you need โ unused code is not compiled.
# Full (default)
= "0.1"
# Minimal core only
= { = "0.1", = false, = ["core"] }
# Just what you need
= { = "0.1", = false, = ["molecules"] }
| Feature | Contents | Includes |
|---|---|---|
full |
Everything | atoms, molecules, organisms, templates, themes |
core |
Signals, layout, renderer | โ |
primitives |
Box, Text, Spacer, etc. | core |
atoms |
Button, Input, Spinner, etc. | primitives |
molecules |
Select, Table, Tabs, etc. | atoms |
organisms |
Modal, DataTable, etc. | molecules |
templates |
AppShell, Page, etc. | organisms |
themes |
Dark, Light, Monokai, etc. | โ |
Performance
Why Rust?
| Metric | tuiuiu.rs | tuiuiu.js |
|---|---|---|
| Startup time | ~1ms | ~50ms |
| Memory usage | ~2MB | ~30MB |
| Binary size | ~500KB | N/A |
| Dependencies | 0* | 0 |
| Type safety | Compile-time | Runtime |
* Only libc for raw terminal mode
Examples
# Clone the repo
# Run examples
Comparison
| Feature | tuiuiu.rs | tuiuiu.js | Ratatui |
|---|---|---|---|
| Signal reactivity | โ | โ | โ |
| Flexbox layout | โ | โ | โ |
| 50+ components | โ | โ | โ |
| Zero deps | โ * | โ | โ |
| Mouse support | โ | โ | โ |
| Native binary | โ | โ | โ |
| Memory safe | โ | โ | โ |
Documentation
๐ For full documentation, concepts, and detailed API reference, see tuiuiu.js โ the authoritative source.
| Topic | Description |
|---|---|
| Quick Start | Get up and running |
| Signals | Reactive state management |
| Layout | Flexbox for terminals |
| Components | All 50+ components |
| Mouse | Click, hover, scroll |
| Charts | Data visualization |
Numbers
| Metric | Value |
|---|---|
| Components | 50+ |
| Dependencies | 0* |
| Hooks | 10 |
| Border styles | 9 |
| Named colors | 18 |
| Feature flags | 8 |
| Binary size | ~500KB |
Why "Tuiuiu"?
The Tuiuiu (Jabiru mycteria) is a majestic Brazilian bird โ the tallest flying bird in South America. Just like this bird stands out in its environment, Tuiuiu stands out in the terminal UI landscape: elegant, powerful, and distinctly Brazilian.
๐ง๐ท Made with โค๏ธ in Brazil
License
MIT ยฉ Tetis
tuiuiu.js โ JavaScript/TypeScript version โข tuiuiu.rs โ Rust version (you are here)