🚀 Luna Desktop
A pure Rust Wayland compositor + custom libwayland-client implementation + OpenGL desktop shell (lu-shell / opengl_gui.c). Run GTK4 apps while replacing Xorg or Weston!
| Name | Actual Binary | Role |
|---|---|---|
| Luna Desktop | Full session | The complete desktop environment users see after kernel boot |
| lu-compositor | vespera-server |
DRM/KMS Wayland compositor (Xorg/Weston replacement) |
| lu-shell | opengl_gui |
Wallpaper, taskbar & shell UI (luUI engine) |
| Luna UI | opengl_gui.c HTML/CSS engine |
UI toolkit for shell & settings apps |
| wayland-client-rs | libwayland_client.so |
Pure Rust client lib that GTK apps connect to |
Internal codename: Vespera User-facing name: Lu (short, memorable, like GNOME/KDE)
systemd / init
└─ lu-session
├─ lu-compositor (vespera-server --backend dri) ✨
├─ lu-shell (opengl_gui --desktop) 🖼️
└─ GTK Apps (WAYLAND_DISPLAY + LD_PRELOAD=libwayland-client) 📱Wayland protocol is used as an internal bus. No Weston, Mutter, or Xorg needed. GTK4 connects directly to the Vespera compositor.
cd vespera
make desktop # 🚀 DRI + lu-shell (GPU console)
make desktop-soft # 💻 Software backend (great for VMs)
# Launch with GTK apps
LU_APPS="target/release/hello-gtk" make desktopsudo make install PREFIX=/usr/local
sudo systemctl enable lu-desktop.service
sudo systemctl start lu-desktop.serviceWorks alongside getty@tty1 auto-login. For manual testing with existing sessions, just run lu-session.
vespera/
├── rust-toolchain.toml
├── Cargo.toml
├── Makefile
├── run-gtk # 🌐 WebGL browser launcher
│
├── wayland-client-rs/ # Pure Rust libwayland-client
├── wayland-server-rs/ # Pure Rust Wayland server (no libwayland-server!)
└── hello-gtk/ # Sample GTK4 app
cd vespera
# Build + show hello-gtk in browser
./run-gtk
# Any GTK4 app
./run-gtk gtk4-demo
./run-gtk /usr/bin/your-gtk-app
# Custom port
PORT=9090 ./run-gtkOpen http://localhost:8081/ → Real-time 1280×720 RGBA streaming via WebGL!
🖱️ Click & type directly in the browser — input goes to the GTK app.
make demo
# vespera-server runs in background
# GTK app connects via LD_PRELOAD
# Output saved to /tmp/vespera.ppm every framecargo build -p wayland-server-rs --features dri
./target/debug/vespera-server --backend dricargo build # Software + DRI
cargo build --features webgl # + WebGL backend
make build
make build-webgl- Zero dependency on
libwayland-server - Full wire protocol compatibility
- Supports:
wl_compositor,wl_shm,wl_seat,xdg_wm_base,zwp_linux_dmabuf_v1(v4) - dmabuf path works with GTK4 using linear modifiers → easy CPU mapping
- Produces
libwayland_client.so.0with proper SONAME - Uses
#[unsafe(naked)]assembly trampoline forwl_proxy_marshal_flags - 79 symbols exported
- Background TCP server
- Serves WebGL viewer on
/ - WebSocket streaming of RGBA frames
- Real-time mouse/keyboard input forwarding:
m X Y→ mouse moveb BTN P→ button press/releasek CODE P→ key press/release
Ready to build the future of Linux desktops in pure Rust? 🦀✨
Let’s make Lu Desktop the snappiest, most hackable desktop environment yet! 🚀