A Rust Framework for Wayland
Conjure desktop widgets with the mystic arts of Rust & Slint — lightweight, customisable, and memory safe.
What is Spell?
Spell is a Rust framework that gives you everything you need to build fully customisable desktop widgets for Wayland compositors — niri, Hyprland, and more. Rather than leaning on GTK, Spell harnesses Slint: a declarative UI language that is beautiful by default and trivial to pick up.
Your widget logic lives in Rust. Your visuals live in Slint. The two meet in Spell — where performance, memory safety, and aesthetics coexist.
Incantations
Slint makes widget design intuitive and expressive. Rust keeps it lightweight, predictable, and genuinely memory safe — no compromise needed.
Once dimensions are set, changes in your Slint UI code are reflected instantly in the running widget. Tighten your feedback loop dramatically.
Spell doesn't impose any new file layouts. It adapts to the existing Slint/Cargo structure you already know — zero new paradigms to learn.
The bundled
spell-cli
lets you expose and manipulate widget state from
outside — enabling seamless integration with your
compositor setup.
Bootstrap with Material or
Vivi component sets via
sp new --material. Professional-grade UI out of the box.
App launcher backend, MPRIS integration, notification backend, and more — a growing collection of common widget functionalities built-in.
Quickstart
Three commands to a running widget. Start with the CLI, scaffold a project, then run.
# install the spell CLI cargo install spell-cli # scaffold a new project sp new my-widget # or with Material components sp new --material my-widget
[dependencies] spell-framework = "1.0.3" slint = "*"
// ui/app-window.slint import { VerticalBox, Button } from "std-widgets.slint"; export component AppWindow inherits Window { // A two-way bindable integer property in-out property <int> counter: 42; // Callback fired when button is clicked callback request-increase-value(); VerticalBox { Text { text: "Counter: \{root.counter}"; } Button { text: "Increase value"; clicked => { root.request-increase-value(); } } } }
The Philosophy
There are very few widget-creation tools written in Rust. Spell was born to fill that void — giving Rustaceans a native, first-class path to desktop customisation without reaching for C or Python.
Spell started as a personal exploration of how Wayland actually works. Building a real client against the protocol is the fastest way to understand it — and a framework emerged as a useful side effect.
Slint is a declarative language you can grok in minutes. Unlike many UI toolkits, its Rust integration is first-class — callbacks, data binding, and hot-reload all feel native.
No batteries included yet means no bloat. Every system functionality you need — sysinfo, network management, Bluetooth — can be plugged in via well-maintained Rust crates.
Ready to Conjure?
The first stable release is out. Try it, file issues, open PRs — the project thrives on community.