Skip to content

UniDesktop API (UDA)

Desktop-enable your app with one type-safe Rust API.

Shipping a cross-platform desktop app today means writing the same feature several times: SystemParametersInfoW on Windows, then gsettings, qdbus, swww and hyprpaper on Linux — each with its own failure modes, session assumptions, and no shared type system.

UDA replaces that fragmentation with one capability-driven Rust API: it probes the environment, selects an available backend, and degrades gracefully instead of failing.

Portal-first

Every Linux feature tries the XDG Desktop Portal before touching anything distro-specific.

Cascading fallback

A strict tier chain: Portal → native DE IPC → CLI tools → a strongly typed UdaError::Unsupported.

Capability-driven

Features advertise SupportLevel::Full / Restricted / Unsupported, so your app can branch before it breaks.

Zero heavy dependencies

Pure Rust zbus on Linux, windows-rs on Windows. No Qt, no GTK, no bundled toolkit.

Entry point Use it for
Rust crates Native Rust apps — use the AppearanceManager, TrayManager, … traits directly
C-ABI (include/uda.h) C/C++, or anywhere a stable ABI matters
Python / Node.js SDKs examples/python/uda.py (ctypes) and examples/nodejs/uda.js (koffi) — no native build step

The 0.2.0 release covers: light/dark appearance detection, wallpaper management with fill modes and multi-monitor targeting, native notifications with icons, urgency and actions, keep-awake locks, system tray with a cross-platform menu model, media control with metadata read and playback commands, and session & power lifecycle (lock, logout, suspend, hibernate, reboot, shutdown).

Per-desktop coverage is listed in the platform support matrix.

Installation

Prerequisites and install paths for Rust, Python, Node.js and C hosts. Open

Hello, desktop

Ten lines to detect the theme and send a notification. Open

Capability & fallback

The tri-state SupportLevel, the four-tier chain, and how to query before you branch. Open

Troubleshooting

Every symptom, cause and fix, in triage order. Open