Dominator is a high-performance declarative DOM library for Rust that focuses on building web applications with minimal overhead by directly manipulating real DOM nodes instead of relying on a virtual DOM. It uses a functional reactive programming model based on signals, allowing UI components to automatically update in response to state changes in an efficient and predictable manner. The library is designed to be “zero-cost,” meaning that abstractions compile down to highly optimized code with no unnecessary runtime overhead. Updates are handled in constant time regardless of application size, making it highly scalable for complex interfaces. Its API is inspired by component-based frameworks like React, but tailored to Rust’s ownership model and compiled to WebAssembly for browser execution. By avoiding the virtual DOM, it eliminates diffing overhead and provides direct control over DOM operations for improved performance.
Features
- Direct DOM manipulation without virtual DOM overhead
- Functional reactive programming model using signals
- Constant-time UI updates regardless of application size
- Declarative component-style API for UI construction
- Compiled to WebAssembly for browser execution
- Zero-cost abstractions with minimal runtime overhead