A modern, multi-platform presentation system built in Rust with real-time synchronization across devices.
Toboggan is a presentation system that allows you to create, serve, and control slide-based presentations across multiple platforms. Write your slides in Markdown or TOML, serve them via a WebSocket-enabled server, and present from any client - web browser, terminal, desktop app, or mobile device.
Note: This is an educational and fun project created to explore Rust's capabilities across different platforms - from embedded systems to web browsers. While fully functional, it's designed primarily for learning and experimentation rather than production use. It's a playground to demonstrate how Rust can target everything from microcontrollers to iOS apps!
- 📝 Simple Content Creation: Write presentations in Markdown or TOML format
- 🔄 Real-time Synchronization: Multi-client synchronization via WebSocket protocol
- 🌐 Multi-platform Clients: Web, Terminal, Desktop, iOS, and embedded support
- 🎯 Educational Focus: Perfect for exploring Rust ecosystem
# Clone the repository
git clone https://github.com/ilaborie/toboggan
cd toboggan
# Build all components
cargo build --release
# Run the server with example presentation
cargo run -p toboggan-server# Convert Markdown to TOML
cargo run -p toboggan-cli -- examples/my-talk.md -o my-talk.toml
# Or create TOML directly
cat > my-talk.toml << 'EOF'
date = "2025-01-26"
[title]
type = "Text"
text = "My Presentation"
[[slides]]
kind = "Cover"
[slides.title]
type = "Text"
text = "Welcome"
EOF# Start the server
cargo run -p toboggan-server -- my-talk.toml
# Open web interface
open http://localhost:8080
# Or use terminal client
cargo run -p toboggan-tui- Rust 1.83+ (2024 edition)
- Node.js 20+ (for web frontend)
mise(optional, for task automation)
# Using mise (recommended)
mise check # Format, lint, and test
mise build # Build all components
# Or using cargo directly
cargo build --release
cargo test
cargo fmt
cargo clippymise build:wasm
# Or manually:
cd toboggan-web/toboggan-wasm
wasm-pack build --target web --releasemise build:ios
# Or manually:
cd toboggan-ios
./build.shcargo build -p toboggan-desktop --releasecargo build -p toboggan-tui --releaseToboggan is designed as a modular system with clear separation of concerns. The architecture follows Clean Architecture principles with well-defined boundaries between components.
toboggan/
├── toboggan-core/ # Core domain models and business logic
├── toboggan-server/ # Axum server with WebSocket & REST
├── toboggan-client/ # Shared client library with WebSocket support
├── toboggan-cli/ # Command-line tool for Markdown → TOML conversion
├── toboggan-web/ # Web frontend with TypeScript and WASM client
├── toboggan-tui/ # Terminal UI client using ratatui
├── toboggan-desktop/ # Native desktop app using iced framework
├── toboggan-ios/ # iOS Rust library with UniFFI bindings
├── TobogganApp/ # Native iOS app using SwiftUI
└── toboggan-esp32/ # ESP32 embedded client (excluded from workspace)
- WebSocket Protocol: JSON-based real-time communication
- Memory Safety: Zero (direct) unsafe code, comprehensive error handling
- Cross-platform: Single codebase targeting multiple platforms
- Modular Design: Clear separation between server, clients, and core logic
Toboggan supports multiple client types, each optimized for different use cases and platforms.
- Technology: TypeScript frontend with WASM client
- Features: Modern web interface, keyboard shortcuts, responsive design
- Usage: Open
http://localhost:8080when server is running - Platform: Any modern web browser
- Technology: ratatui with crossterm
- Features: Full-featured terminal interface, presenter view, slide navigation
- Usage:
cargo run -p toboggan-tui - Platform: Linux, macOS, Windows terminals
- Technology: iced native GUI framework
- Features: Native desktop experience with system integration
- Usage:
cargo run -p toboggan-desktop - Platform: Linux, macOS, Windows native
- Technology: SwiftUI with Rust core via UniFFI
- Features: Native iOS interface, gesture controls, AirPlay support
- Usage: Build and run from Xcode
- Platform: iOS 16+ devices and simulator
- Technology: ESP-IDF with embedded-graphics
- Hardware: ESP32-S3-BOX-3B development board
- Features: WiFi connectivity, LCD display, LED indicators
- Platform: ESP32 microcontrollers
Toboggan uses a simple JSON-based WebSocket protocol for real-time synchronization:
Next,Previous,First,Last- NavigationGoto { slide: N }- Jump to specific slidePlay,Pause,Resume- Presentation controlRegister { client_id }- Client registration
State { current_slide, state }- Presentation state updatesError { message }- Error notificationsPong- Heartbeat response
cargo test # All tests
cargo nextest run # Faster parallel tests
cargo test -p toboggan-core # Specific cratecargo fmt # Format code
cargo clippy # Lint code
mise check # All checkscargo doc --open # Generate and open docsWe welcome contributions to Toboggan! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes following the project guidelines
- Run tests:
mise checkorcargo test - Submit a pull request
- Code Quality: All code must pass
cargo fmt,cargo clippy, and tests - Safety: No
unsafecode allowed (enforced by lints) - Error Handling: Use
ResultandOption, avoidunwrap()in favor ofexpect() - Documentation: Document public APIs and complex logic
- Testing: Add tests for new features and bug fixes
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Built with excellent Rust crates including:
Core Infrastructure
- tokio - Async runtime powering the server and clients
- axum - Web framework for the REST API and WebSocket server
- serde - Serialization framework for all data structures
- anyhow - Flexible error handling across the project
Client Platforms
- wasm-bindgen - WebAssembly bindings for browser
- web-sys - Browser API bindings for WASM
- gloo - Toolkit for building WASM applications
- ratatui - Terminal UI framework
- crossterm - Cross-platform terminal manipulation
- iced - Native desktop GUI framework
- uniffi - Rust-Swift interoperability for iOS
- esp-idf-svc - ESP-IDF services for ESP32
- embedded-graphics - 2D graphics for embedded displays
- mipidsi - MIPI Display Interface driver
Networking & Communication
- tokio-tungstenite - Async WebSocket implementation
- reqwest - HTTP client for API calls
- tower-http - HTTP middleware and services
Utilities
- clap - Command-line argument parsing
- tracing - Structured application logging
- jiff - Date and time handling
- toml - TOML configuration parsing
- comrak - Markdown parsing and rendering
And many more amazing crates that make Rust development a joy!