Sweets
Installation

Build from Source

Build, test, and install the Rust version of Sweets from a local checkout

Sweets builds with Cargo and stable Rust. The workspace produces the sweets compositor and the sweets-session native login-session launcher.

Sweets uses a pinned Smithay revision. It does not use wlroots, Meson, Ninja, or SceneFX. Lua 5.4 is built into the configuration crate, so a system Lua package is not required.

Sweets is Linux-only, Wayland-only, and pre-release software. Test the nested backend first, and keep another login session or SSH access available when testing the native backend.

Requirements

Install Rust 1.85 or newer, Cargo, Git, a C compiler, pkg-config, and the development files for these system libraries:

LibraryUsed for
DRM, GBM, and EGLNative display access and rendering
libinput and libudevPhysical input and device discovery
libseatNative seat acquisition and VT switching
WaylandServer and nested-backend integration
libxkbcommonKeyboard keymaps and key handling
Pango and CairoConfig-error bar text and pixel rendering

Use your distribution packages or follow the official Rust installation guide for the Rust toolchain.

Arch Linux

sudo pacman -S --needed base-devel git rustup pkgconf libdrm mesa libinput \
  libseat systemd-libs wayland libxkbcommon pango cairo
rustup default stable

Install seatd as well when the native session will use seatd instead of systemd-logind.

Fedora

sudo dnf install gcc git rust cargo pkgconf-pkg-config libdrm-devel \
  mesa-libEGL-devel libgbm-devel libinput-devel libseat-devel \
  libudev-devel wayland-devel libxkbcommon-devel pango-devel cairo-devel

Debian and Ubuntu

sudo apt update
sudo apt install build-essential git pkg-config libdrm-dev libegl1-mesa-dev \
  libgbm-dev libinput-dev libseat-dev libudev-dev libwayland-dev \
  libxkbcommon-dev libpango1.0-dev libcairo2-dev

The distribution-provided Rust compiler must still be version 1.85 or newer. Use rustup when the packaged compiler is older.

  • A working libseat provider, such as systemd-logind or seatd, is required for the native backend.
  • foot is opened by the built-in Super+Return recovery binding. Install it or replace that binding in your configuration before starting a native session.
  • Xwayland 24.1.0 or newer enables X11 applications. Version 24.1.13 is the accepted runtime. Native Wayland applications remain available without it.
  • Screen sharing through XDG portals requires xdg-desktop-portal, xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, PipeWire, a PipeWire session manager such as WirePlumber, and a source chooser supported by the wlr portal.

Build

Clone the repository:

git clone https://github.com/naurissteins/Sweets.git
cd Sweets

Build the complete release workspace:

cargo build --release --locked --workspace --all-features

Cargo downloads the pinned Smithay revision and the locked Rust dependencies. The resulting binaries are target/release/sweets and target/release/sweets-session.

Verify the binary and the maintained Lua configuration:

./target/release/sweets --version
./target/release/sweets --check-config config/sweets.lua

Configuration validation exits without opening a Wayland socket or acquiring the seat.

Test the nested backend

Stage the maintained defaults under the build prefix, then start Sweets from an existing Wayland session:

install -Dm644 config/sweets.lua target/share/sweets/sweets.lua
SWEETS_BACKEND=nested ./target/release/sweets

The nested backend opens Sweets in a window and does not acquire the physical seat. Press Super+Return to open Foot and Super+Shift+Q to exit. A user configuration at ${XDG_CONFIG_HOME:-$HOME/.config}/sweets/sweets.lua, when present, is applied over the staged defaults.

For more diagnostics, set a standard Rust tracing filter:

RUST_LOG=sweets=debug SWEETS_BACKEND=nested ./target/release/sweets

Install system-wide

Install the release binaries, maintained defaults, and display-manager session entry:

sudo install -Dm755 target/release/sweets /usr/local/bin/sweets
sudo install -Dm755 target/release/sweets-session \
  /usr/local/bin/sweets-session
sudo install -Dm644 config/sweets.lua \
  /usr/local/share/sweets/sweets.lua
sudo install -Dm644 packaging/sweets.desktop \
  /usr/share/wayland-sessions/sweets.desktop

Sweets derives the installed configuration path from the compositor binary. For /usr/local/bin/sweets, the matching defaults belong at /usr/local/share/sweets/sweets.lua.

Optional session integration

Install the systemd user target when the host uses a systemd user manager:

sudo install -Dm644 packaging/systemd/sweets-session.target \
  /usr/local/lib/systemd/user/sweets-session.target
systemctl --user daemon-reload

Sweets also has a portable non-systemd startup path. Do not install the target on a system that does not use systemd.

Install the portal preference when using XDG desktop portals:

sudo install -Dm644 packaging/xdg-desktop-portal/sweets-portals.conf \
  /usr/local/share/xdg-desktop-portal/sweets-portals.conf

This selects the wlr backend for Screenshot and ScreenCast and the GTK backend for the remaining portal interfaces.

Start a native session

Log out after installation and select Sweets from your display manager. The sweets-session launcher prepares the native Wayland environment, checks the XWayland version when available, creates a private session log, and starts the compositor with SWEETS_BACKEND=native.

The native backend owns the seat and displays. Do not start it from a terminal inside another graphical session. Use the nested backend for development inside an existing desktop.

Session logs

The session launcher stores private logs under:

${XDG_STATE_HOME:-$HOME/.local/state}/sweets/sessions/

The sweets.log symbolic link points to the current session log:

tail -f "${XDG_STATE_HOME:-$HOME/.local/state}/sweets/sweets.log"

Sweets retains the newest ten managed session logs. Set SWEETS_SESSION_LOG to an absolute path to use one custom log instead.

Next steps

  • Configuration — create a small Lua override without editing the installed defaults
  • Key bindings — review and customize the keyboard workflow
  • Desktop integration — configure session services and desktop components

On this page