rust_native-1.1.0 has been yanked.
RustUI - Cross-Platform UI Framework
A modern, cross-platform UI framework written in Rust that supports desktop, web, iOS, and Android platforms.
Features
- 🎯 Cross-platform support (Desktop, Web, iOS, Android)
- 🎨 Flexible styling system
- 📱 Responsive layouts
- 🔄 State management
- 🎭 Animations
- 📍 Gesture recognition
- 🧭 Navigation system
Getting Started
Prerequisites
# Install Rust
|
# Install additional dependencies for different platforms
# For iOS
# For Android
# For Web (WebAssembly)
Building and Running
Desktop
# Run desktop example
# Build for release
iOS
# Build for iOS simulator
# Build for iOS device
# Open Xcode project
Android
# Build Android libraries
# Open Android project in Android Studio
&&
Web
# Build WebAssembly package
# Serve example
&& &&
Examples
Basic App
use *;
Styled Components
.child
new
Responsive Layout
.with_responsive_layout
new
Project Structure
RustUI/
├── src/
│ ├── components/ # UI components
│ ├── platform/ # Platform-specific implementations
│ ├── animation/ # Animation system
│ ├── gesture/ # Gesture recognition
│ ├── layout/ # Layout system
│ ├── navigation/ # Navigation system
│ ├── renderer/ # Rendering backend
│ └── style/ # Styling system
├── examples/ # Example applications
├── ios/ # iOS project files
├── android/ # Android project files
└── www/ # Web (WebAssembly) files
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Rust community
- Cross-platform UI frameworks that inspired this project
RustUI Development Server
A development server for RustUI applications with multi-platform support and hot-reloading capabilities.
Features
- Live reload development server
- Multi-platform support (Desktop, iOS, Android, Web)
- Terminal-based UI interface
- File watching and automatic rebuilding
Controls
r
- Reload/rebuild the current applications
- Reopen/restart the development serverq
- Quit the development server1
- Switch to Desktop platform2
- Switch to iOS platform3
- Switch to Android platform4
- Switch to Web platform
Status Indicators
The server displays build status with color coding:
- 🟢 Green: Ready/Success
- 🟡 Yellow: Building in progress
- 🔴 Red: Error (with error message)
Requirements
- Rust (latest stable version)
- Cargo
- Required dependencies:
[] = "5.0" = "0.25"
Usage
- Clone the repository
- Run the development server:
- The server will automatically watch for file changes in the current directory
- Use the keyboard controls to switch platforms or trigger rebuilds
Implementation Details
The server consists of two main components:
main.rs
: Terminal UI and user input handlingdev_server.rs
: Development server implementation with platform-specific builds
Current limitations:
- iOS, Android, and Web implementations are placeholder stubs
- Only Desktop builds are fully implemented