Guido
A reactive Rust GUI library for Wayland layer shell widgets.
Overview
Guido is a GPU-accelerated GUI library for building Wayland layer shell applications like status bars, panels, and overlays. It features a fine-grained reactive programming model inspired by Floem, with automatic dependency tracking and efficient re-rendering.
Note: This project is developed collaboratively using AI agents.
Features
- Fine-Grained Reactivity - Thread-safe reactive signals with automatic dependency tracking. Signals are
Copy, eliminating manual cloning - State Layer System - Declarative hover/pressed style overrides with animations and Material-style ripple effects
- GPU Rendering - Hardware-accelerated rendering via wgpu with SDF-based shapes
- Transform System - Translate, rotate, and scale widgets with proper hit testing and animations
- Multi-Surface Apps - Create multiple layer shell surfaces that share reactive state, with dynamic property modification
- Superellipse Corners - Configurable corner curvature from squircle (iOS-style) to bevel to scoop
- SDF Borders - Crisp anti-aliased borders using signed distance field rendering
- Component Macro -
#[component]macro for creating reusable widgets with reactive props, callbacks, children, and slots - Type Erasure -
AnyWidgetandWidget::into_any()for conditional widget branches - Composable Widgets - Build UIs from minimal primitives with pluggable Flex layout
- Layer Shell Support - Native Wayland layer shell integration for status bars and panels
- HiDPI Support - Automatic scaling for high-resolution displays
- Image Widget - Display raster images (PNG, JPEG, WebP) and SVGs with GPU texture caching
- Scrollable Containers - Vertical/horizontal scrolling with customizable scrollbars and momentum
- Text Styling - Font family (sans-serif, serif, monospace, custom) and weight (thin to black) support
Quick Start
use *;
Building
# Build the library
# Run the status bar example
# Run the reactive example (demonstrates signals and events)
# Run the showcase (demonstrates various curvature options)
# Run the component example (demonstrates reusable components)
Examples
- status_bar - Basic status bar layout demonstration
- reactive_example - Interactive features with signals and state layers
- multi_surface - Multiple surfaces with shared reactive state
- surface_properties_example - Dynamic surface property modification (layer, keyboard interactivity)
- state_layer_example - Hover, pressed states, and ripple effects
- transform_example - Rotation, scale, and animated transforms
- animation_example - Spring and eased animations
- showcase - Corner curvature variations (squircle, circle, bevel, scoop)
- component_example - Reusable components with reactive props
- children_example - Dynamic lists with keyed reconciliation
- image_example - Raster and SVG images with content fit modes
- scroll_example - Scrollable containers with custom scrollbar styling
- scroll_mixed_content - Scrolling with text, text input, and images combined
- text_styling_example - Font families and weights for text styling
- service_example - Background services with automatic cleanup
- render_stats_test - Render performance debugging (requires
--features render-stats)
Documentation
- Architecture Overview - System design and module structure
- State Layer API - Hover/pressed styles and ripple effects
- Transform System - Translate, rotate, scale with animations
- Reactive System - Signals, computed values, and effects
- Styling Guide - Colors, gradients, borders, and corners
- Image Widget - Displaying raster and SVG images
Requirements
- Rust 1.70+
- Wayland compositor with layer shell support (e.g., Sway, Hyprland)
- GPU with Vulkan or OpenGL support
License
MIT License - see LICENSE for details.