# WayRay - SunRay-like Thin Client Wayland Compositor
## Project Overview
WayRay is a modern reimplementation of Oracle/Sun's SunRay thin client architecture as a Wayland compositor written in Rust. The goal is to provide stateless thin client computing with session mobility, hot-desking, and zero-state endpoints over a modern protocol stack.
- **Linux** - Full support with optional GPU acceleration
- Architecture is **headless-first**: Smithay with `default-features = false`, no dependency on DRM/KMS, libinput, udev, or libseat in the core path. Platform-specific backends behind feature flags.
## Language & Stack
- **Language**: Rust (edition 2024)
- **Compositor Framework**: Smithay (Wayland compositor library)
- **Event Loop**: calloop (callback-based, not async)
- **Networking**: QUIC via quinn for low-latency multiplexed transport
- **Encoding**: H.264/AV1 via VAAPI/NVENC for display, Opus for audio
- **Error Reporting**: miette with diagnostic patterns for user-facing errors
- **ORM**: SeaORM for any database needs (never raw SQL)
- **Logging**: tracing crate
## Architecture
WayRay consists of four main components:
1.**wayray-server** (compositor) - Smithay-based Wayland compositor that runs applications, captures framebuffers, and transmits them to clients. Exposes a pluggable WM protocol.
2.**wayray-client** (viewer) - Lightweight display client that decodes frames, renders them locally, captures input, and sends it to the server
3.**wayray-protocol** - Shared protocol definitions for the WayRay wire protocol over QUIC
4.**wayray-ctl** - CLI management tool for server/session administration
## Documentation
- **docs/ai/plans/** - Implementation plans
- **docs/ai/adr/** - Architecture Decision Records
- **docs/architecture/** - System architecture documentation
- **docs/protocols/** - Protocol specifications
- **book/** - mdbook user guide (build with `mdbook build book/`)
## Key Design Decisions
- **Headless-first**: No hard dependency on GPU, DRM, or Linux-specific subsystems
- **Compositor, not a DE**: Cannot run GNOME/KDE (they ARE compositors). Desktop composed from independent Wayland clients (WM + panel + launcher + apps). Like Sway's ecosystem.
- **Greeter as Wayland client**: Login screen is a regular Wayland app, not a separate compositor. External session launcher handles PAM/user env (like greetd for Sway).
- **WayRay does NOT own**: user auth, home dir mounting, PAM, user environment setup. Those are the host system's job. WayRay owns the compositor session and token binding.