A cohesive, opinionated framework that combines well-known libraries (crossterm, ratatui, smol) into one for building consistent terminal applications.
- Performance: Maintain sub-nanosecond state snapshots and minimal memory overhead
- Safety: Zero unsafe code, thread-safe operations, proper error handling
- Ergonomics: Intuitive API design, clear documentation
- Modularity: Clean separation of concerns, flexible architecture
- Aesthetics: Pretty terminal UIs with expressive theming
Oxitty embraces several key design principles:
-
Zero-Cost Abstractions
- Atomic operations over locks
- Static dispatch over dynamic
- Stack allocation when possible
-
Type Safety
- Strong type system usage
- Compile-time guarantees
- No unsafe code
-
Efficient Memory Use
- Predictable allocation patterns
- Zero-copy operations
- Bounded channels
-
Clean Architecture
- Clear separation of concerns
- Modular component design
- Flexible extension points
-
Atomic State Management
- Thread-safe state mutations
- Immutable snapshots for consistency
- Zero-cost state updates
- Type-safe state access
-
Event System
- Non-blocking event processing
- Bounded channels (1024 events)
- Custom event support
- Zero-copy message passing
-
Color System
- Full RGBA color support
- HSL/RGB/Hex conversions
- Theme management
- Efficient color operations
-
Terminal Management
- Raw mode handling
- Alternate screen support
- Mouse capture
- Clean shutdown
-
Error Handling
- Rich diagnostic information
- Source code context
- Error spans
- Clean error types
State Snapshots (100-10k items)
├── Time: 454.48ps - 455.29ps
├── Variance: σ < 11ps
└── R² values > 0.94
State Updates
├── 100 items: 90.34ns
├── 1k items: 898.88ns
└── 10k items: 9.13μs
Base Footprint
├── Initial: 1,088 bytes
├── Per-item: 74.5 bytes
└── Utilization: ~100%
Scaling (Peak Memory)
├── 100 items: 16.9 KB
├── 1k items: 82.9 KB
└── 10k items: 742.7 KB
Event Processing
├── Roundtrip: 46.98ns
├── Variance: σ = 2.36ns
└── Channel capacity: 1,024
# Run tests
cargo test
# Run benchmarks
cargo bench
# Build docs
cargo doc --no-deps --open
This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.
Made with