Build from Source
Build and install Sweets from a local checkout
Sweets builds with Cargo and stable Rust. The build produces two binaries:
sweets, the compositor, and sweets-session, the native login-session
launcher.
Sweets is Linux-only, Wayland-only, and pre-release. Test the nested backend first, and keep a second login session or SSH access available before you start the native backend.
Requirements
Rust 1.85 or newer, Cargo, Git, a C compiler, and pkg-config, plus the
development files for these libraries:
| Library | Used for |
|---|---|
| DRM, GBM, EGL | Display access and rendering |
| libinput (1.21 or newer), libudev | Input and device discovery |
| libseat | Seat acquisition and VT switching |
| Wayland | Server and nested backend |
| libxkbcommon | Keyboard keymaps |
| Pango, Cairo | Config-error bar text |
Arch Linux
sudo pacman -S --needed base-devel git rustup pkgconf libdrm mesa libinput \
libseat systemd-libs wayland libxkbcommon pango cairo
rustup default stableAdd seatd if the native session will not use 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-develDebian 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-devUse rustup if your distribution ships a Rust older than 1.85.
Optional runtime packages
| Package | Enables |
|---|---|
| systemd-logind or seatd | Native backend (required) |
foot | The built-in Super+Return binding |
| Xwayland 24.1.0 or newer | X11 applications |
xdg-desktop-portal, xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, PipeWire, WirePlumber | Screen sharing |
Build
git clone https://github.com/naurissteins/Sweets.git
cd Sweets
cargo build --release --locked --workspace --all-featuresThe binaries are target/release/sweets and target/release/sweets-session.
Verify the build and the default configuration:
./target/release/sweets --version
./target/release/sweets --check-config config/sweets.luaTest the nested backend
Run Sweets in a window inside your current Wayland session:
install -Dm644 config/sweets.lua target/share/sweets/sweets.lua
SWEETS_BACKEND=nested ./target/release/sweetsSuper+Return opens Foot. Super+Shift+Q exits. A user configuration at
~/.config/sweets/sweets.lua is applied over the staged defaults.
For more log output:
RUST_LOG=sweets=debug SWEETS_BACKEND=nested ./target/release/sweetsInstall system-wide
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.desktopThe default configuration path follows the binary path. A compositor at
/usr/local/bin/sweets reads its defaults from
/usr/local/share/sweets/sweets.lua.
systemd user target
Install this only on a system with a systemd user manager:
sudo install -Dm644 packaging/systemd/sweets-session.target \
/usr/local/lib/systemd/user/sweets-session.target
systemctl --user daemon-reloadPortal preference
Selects the wlr backend for Screenshot and ScreenCast, and the GTK backend for the other portal interfaces:
sudo install -Dm644 packaging/xdg-desktop-portal/sweets-portals.conf \
/usr/local/share/xdg-desktop-portal/sweets-portals.confStart a native session
Log out and select Sweets in your display manager.
Never start the native backend from a terminal inside another graphical session. It takes over the seat and displays.
Session logs
tail -f "${XDG_STATE_HOME:-$HOME/.local/state}/sweets/sweets.log"The newest ten session logs are kept in the same directory under sessions/.
Set SWEETS_SESSION_LOG to an absolute path to use one custom log instead.
Next steps
- Configuration — create a personal Lua override
- Key bindings — review the default keyboard workflow
- Desktop portals — configure save dialogs, screen sharing, and keyring access