weavetui is a modern, robust, and modular Text User Interface (TUI) framework for Rust, designed to simplify the development of sophisticated and interactive terminal applications. This repository serves as both the primary application showcasing the framework's capabilities and the foundational crates that enable its powerful component-based architecture.
β¨ Features
- Component-Driven Architecture: Leverage a declarative, component-based model for building complex UIs with ease.
- Automatic Trait Implementation: Utilize the
weavetui_deriveprocedural macro for automatic implementation ofComponentandComponentAccessortraits, significantly reducing boilerplate. - Modular Design: Built with
weavetui_coreas its foundation, ensuring high modularity, maintainability, and extensibility. - Event Handling System: A flexible event system for managing keyboard, mouse, and custom events within your TUI applications.
- Real-world Application Example: The
weavetuiapplication itself serves as a comprehensive example, demonstrating best practices for component composition, state management, and event handling. - Interactive User Experience: Designed to deliver responsive and engaging user experiences directly within the terminal environment.
π Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
- Rust programming language (stable or beta channel recommended). You can install it via
rustup:| - Cargo, Rust's package manager (comes with Rust installation).
Installation
-
Clone the repository:
-
Build the project: This command will compile all crates within the workspace (
weavetui,weavetui_core,weavetui_derive).Using
--releaseis recommended for optimized performance.
Running the Application
To launch the weavetui example application (which demonstrates the framework's capabilities):
This command compiles and runs the main weavetui application, serving as a practical demonstration of the framework's features directly in your terminal.
π Project Structure
This repository is organized as a Rust workspace, containing the following crates:
weavetui/(root): The main application crate that orchestrates the UI and application logic, serving as a practical demonstration of the framework.weavetui_core/: A foundational library defining core TUI traits (Component,ComponentAccessor), event handling mechanisms, and utility functions.weavetui_derive/: A procedural macro crate providing the#[component]attribute for automatic trait implementation, simplifying component creation.
π§ͺ Running Tests
To ensure the stability and correctness of the framework and application, you can run the test suite:
This command will execute all unit and integration tests across all workspace crates.
π€ Contributing
We welcome and encourage contributions from the community! Whether you're looking to report a bug, suggest an enhancement, or contribute code, please refer to our CONTRIBUTING.md for detailed guidelines on how to get involved.
πΊοΈ Roadmap
- Enhanced layout management system.
- More sophisticated styling and theming capabilities.
- Expanded set of pre-built UI components.
- Improved accessibility features.
- Comprehensive documentation and tutorials.
π License
This project is licensed under the MIT License. See the LICENSE file for details.