| Crates.io | waterui-core |
| lib.rs | waterui-core |
| version | 0.1.0 |
| created_at | 2025-09-07 14:21:58.43815+00 |
| updated_at | 2025-09-07 14:21:58.43815+00 |
| description | Core functionality for the WaterUI framework |
| homepage | |
| repository | https://github.com/water-rs/waterui |
| max_upload_size | |
| id | 1828170 |
| size | 86,187 |
The foundational crate of the WaterUI framework, providing essential building blocks for developing cross-platform reactive user interfaces.
waterui-core establishes a unified architecture that works consistently across desktop, mobile, web, and embedded environments. It provides the core abstractions and systems that all other WaterUI components build upon.
AnyView enables heterogeneous collections of different view typesThe foundation of all UI components:
pub trait View: 'static {
fn body(self, env: &Environment) -> impl View;
}
Type-based dependency injection system:
let env = Environment::new()
.with(Theme::Dark)
.install(LocalizationPlugin::new("en_US"));
Type-erased view container for dynamic composition:
let views: Vec<AnyView> = vec![
AnyView::new(Text::new("Hello")),
AnyView::new(Button::new("Click me")),
];