StratoSDK
StratoSDK is a framework with a declarative approach similar to Flutter/React, written and designed entirely for Rust.
StratoSDK 🦀
StratoSDK is a next-generation, lightweight, secure, and reactive UI framework written in pure Rust. It combines the declarative programming model of Flutter/React with Rust's performance and safety guarantees, offering GPU-accelerated rendering for desktop applications and WebAssembly support for web deployment.

Features
- 🚀 Pure Rust Implementation - Zero unsafe code, leveraging Rust's safety guarantees
- 🎨 Declarative API - Intuitive widget-based UI construction similar to Flutter/React
- ⚡ GPU Acceleration - Hardware-accelerated rendering via wgpu (Vulkan/Metal/DirectX/WebGL)
- 🌐 Cross-Platform - Native support for Windows, macOS, Linux, and WebAssembly
- 🔄 Reactive State Management - Built-in signals and reactive primitives
- 📦 Lightweight - Minimal dependencies and small binary size
- 🎭 Theming System - Comprehensive theming with dark/light mode support
- 🔥 Hot Reload - Fast development iteration (development mode)
Architecture
StratoSDK follows a modular architecture with clear separation of concerns:
strato-ui/
├── strato-core/ # Core functionality (state, events, layout)
├── strato-renderer/ # GPU rendering backend
├── strato-widgets/ # UI component library
├── strato-platform/ # Platform abstraction layer
└── strato-macros/ # Procedural macros for better DX
Quick Start
Prerequisites
- Rust 1.80+ (stable)
- Platform-specific requirements:
- Windows: MSVC or MinGW
- macOS: Xcode Command Line Tools
- Linux:
build-essential,libxkbcommon-dev
Installation
Add StratoSDK to your Cargo.toml:
[dependencies]
strato-core = "0.1.0"
strato-widgets = "0.1.0"
strato-platform = "0.1.0"
Hello World Example
use strato_widgets::prelude::*;
use strato_platform::ApplicationBuilder;
fn main() {
ApplicationBuilder::new()
.title("Hello StratoSDK")
.run(build_ui())
}
fn build_ui() -> impl Widget {
Container::new()
.padding(20.0)
.child(
Column::new()
.spacing(10.0)
.children(vec![
Box::new(Text::new("Hello, StratoSDK!")),
Box::new(Button::new("Click Me")
.on_click(|| println!("Clicked!"))),
])
)
}
📚 Documentation
Core Concepts
Widgets
Widgets are the building blocks of StratoSDK applications. Every UI element is a widget with properties, state, and rendering logic.
// Creating widgets
let button = Button::new("Submit")
.style(ButtonStyle::primary())
.on_click(handle_submit);
let input = TextInput::new()
.placeholder("Enter your name...")
.on_change(|text| println!("Text: {}", text));
Layout System
StratoSDK uses a Flexbox-based layout system for arranging widgets:
Row::new()
.spacing(10.0)
.main_axis_alignment(MainAxisAlignment::SpaceBetween)
.children(vec![...])
Column::new()
.cross_axis_alignment(CrossAxisAlignment::Center)
.children(vec![...])
State Management
Reactive state management with signals:
use strato_core::state::Signal;
let count = Signal::new(0);
// Subscribe to changes
count.subscribe(Box::new(|value| {
println!("Count changed to: {}", value);
}));
// Update state
count.set(42);
Theming
Comprehensive theming support:
let theme = Theme::dark();
ThemeProvider::new(theme)
.child(your_app_widget)
🛠️ Development
Building from Source
# Clone the repository
git clone https://github.com/StratoSDK/strato-ui.git
cd strato-ui
# Build all crates
cargo build --workspace
# Run tests
cargo test --workspace
# Run examples
cargo run --example hello_world
cargo run --example counter
WebAssembly Build
# Install wasm-pack
cargo install wasm-pack
# Build for web
wasm-pack build --target web crates/strato-platform
# Serve with a local server
python -m http.server 8000
Roadmap
Phase 1: Foundation ✅
- Core architecture
- Basic state management
- Event system
- Layout engine
Phase 2: Rendering ✅
- wgpu integration
- Basic shape rendering
- Text rendering
- Texture management
Phase 3: Widgets ✅
- Core widget system
- Basic widgets (Button, Text, Container)
- Layout widgets (Row, Column, Stack)
- Input widgets (TextInput)
Phase 4: Platform
- Desktop support (Windows, macOS, Linux)
- WebAssembly support
- Mobile support (future)
Phase 5: Polish
- Animation system
- Advanced widgets
- Visual designer
- Plugin system
Architecture Details
Multi-Crate Structure
| Crate | Description | Key Features |
|---|---|---|
strato-core | Core functionality | State management, events, layout engine |
strato-renderer | GPU rendering | wgpu backend, texture atlas, text rendering |
strato-widgets | Widget library | Declarative widgets, theming, builders |
strato-platform | Platform layer | Window management, event loop, WASM support |
strato-macros | Procedural macros | Derive macros, DSL support |
Performance Targets
- Startup Time: < 100ms
- Frame Time: < 16.67ms (60 FPS minimum)
- Memory Usage: < 50MB base
- WASM Size: < 500KB compressed
- Layout Time: < 1ms per 1000 widgets
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
StratoSDK is dual-licensed under either:
- MIT License (LICENSE-MIT)
- Commercial license (LICENSE-COMMERCIAL)
at your option.
Acknowledgments
- wgpu team for the excellent GPU abstraction
- winit for cross-platform windowing
- lyon for 2D graphics algorithms
- cosmic-text for text rendering
- The Rust community for amazing tooling and support
Contact - (not yet available)
- Website: StratoSDK.dev
- GitHub: github.com/StratoSDK/strato-ui
- Discord: Join our community
- Twitter: @StratoHQ
Examples
Check out our examples directory for more complete applications:
-
Hello World - Basic application structure
<img width="373" height="516" alt="Screenshot 2025-12-15 alle 22 55 19" src="https://github.com/user-attachments/assets/800d2741-f65b-4023-b3eb-917a117f4d23" /> -
Counter - State management example
<img width="462" height="394" alt="Screenshot 2025-12-15 alle 22 48 41" src="https://github.com/user-attachments/assets/c9803155-a17e-4f42-8876-e65b8a87a2bd" /> -
Modern Dashboard - New! Comprehensive example featuring:
- Modular architecture (Views, Components)
- Multi-page navigation (Dashboard, Analytics, Users, Settings)
- Modern UI with responsive layout (Flexbox)
- Theming system
- Simulated backend integration <img width="1552" height="987" alt="Screenshot 2025-12-15 alle 22 47 22" src="https://github.com/user-attachments/assets/3b8f3b3b-6191-4ad1-aee2-aacfc6d15efb" />
-
Todo App - Full CRUD application (coming soon)
-
Calculator - Complex layout example
<img width="432" height="624" alt="Screenshot 2025-12-15 alle 22 46 42" src="https://github.com/user-attachments/assets/687f46d5-4d7b-49b6-93cd-9fc965b0c13f" />
Built with ❤️ in Rust by the StratoSDK Team