Skip to content
  1. Docs
  2. enzUI framework
  3. Developers

Project layout and features

The enzUI crates, what each is for, and every Cargo feature an application can turn on.

An application usually depends on enzui-widgets with its defaults and reaches the rest through its forwarding features. Add another crate directly only for what it alone offers.

Crates

CrateWhat it is
enzui-coreActions, shortcuts, semantics, focus, portals, media and other runtime models
enzui-themeThe enzUI Nebula theme in dark and light, the spacing, radius and typography scales, and the iced::Theme adapter
enzui-widgetsThe widget library and application shell
enzui-iconsBundled Lucide icons and the icon registry
enzui-terminalA GPU terminal widget
enzui-servicesMedia (GStreamer, MPRIS), process transport and activation, credential store, document preview, Git status, OAuth, DNS, mail; each heavy backend behind a feature
enzui-resourcesRemote resource loading and image decoding
enzui-external-imageDMA-BUF frames from another process, drawn on the renderer's own GPU device without a CPU copy
enzui-clipboardThe Wayland clipboard on the application's own connection and seat
enzui-clipboard-runtimeInstalls that clipboard into an iced runtime
enzui-waylandPortal parent export, compositor glass, the system bell and surface hints
enzui-parent-leaseLifetime rules for an XDG portal parent lease
enzui-activityBackground activity publishing
enzui-center-protocol, enzui-agent, enzui-agent-appOptional integration with the enzUI OS agent service; enzui-widgets does not depend on them
enzui-securityProcess-level security primitives
enzui-frame-checkChecks that animated views replay what a full redraw draws (dev-dependency)
enzui-test-supportSource scanners and test helpers (dev-dependency only)

Every crate under crates/ has a README.md saying what it is for.

Kinds of feature

  • Default features are on unless you turn them off.
  • Opt-in features are for applications.
  • Test-only features exist for test targets and measurement builds. They belong in [dev-dependencies], never in what you ship.

enzui-widgets

FeatureKindWhat it turns on
x11opt-inThe X11 window backend (iced, clipboard)
waylanddefaultThe Wayland window backend (iced, clipboard)
desktop-portaldefaultFollow the desktop's settings over the Settings portal: accent, contrast, text size, window buttons, input preferences and the UI font; quiet without a session bus
portal-dbusopt-inThe XDG desktop portal backend (file chooser, open URI, screen cast, notifications); starts a Tokio runtime when used
application-dbusopt-inSingle-instance launching and D-Bus activation (ApplicationService)
shell-integrationopt-inThe tray icon and launcher badge
emoji-pickeropt-inemoji_picker: the emoji chooser and the names and shortcodes it searches
locale-formattersopt-inCurrency, percent, relative-time and duration formatting

enzui-core

FeatureKindWhat it turns on
accesskitopt-inThe AccessKit bridge for the accessibility tree (the widgets runtime enables it)
application-dbusopt-inorg.freedesktop.Application, single instance, search provider
shell-integrationopt-intray (a status-notifier tray icon with a dbusmenu menu) and launcher_badge
thumbnail-cacheopt-inThe freedesktop thumbnail cache, read and written
locale-formattersopt-inCurrency, percent, relative-time and duration formatting on Locale (ICU4X CLDR data)
portal-dbusopt-inThe XDG desktop portal D-Bus backend
desktop-settings-portalopt-inThe Settings portal source of desktop_settings
desktop-font-portalopt-inThe Settings portal source of desktop font preferences
a11y-preferences-portalopt-inThe Settings portal source of contrast preferences for materials
notification-freedesktopopt-inDesktop notifications through org.freedesktop.Notifications outside a sandbox
test-frametest-onlyThe headless frame, keyboard_traversal_validation and chained_operation; see Testing
perf-reporttest-onlyThe repeatable workload report; implies test-frame

enzui-core also has opt-in diagnostic features (native-invalidation, transition-capture, perf-counter, activation-native-iced) and several test-only fault-injection and observation features used by the framework's own tests.

enzui-theme

FeatureKindWhat it turns on
system-themedefaultThe operating system's colour scheme as tasks and subscriptions
system-reduced-motiondefaultThe operating system's reduced-motion setting
desktop-fontsdefaultThe desktop font preference feed
desktop-materialsdefaultThe desktop material preference feed
material-tuningopt-inProcess-wide material preset overrides

enzui-services

All off by default: each one links a backend or claims a bus name.

FeatureWhat it turns on
gstreamerGStreamer audio and video services, and event sounds (event_sound)
mprisThe MPRIS media-controls adapter
pdf-previewPDF page rendering through the system pdfium
secret-serviceThe Secret Service backend of the credential store
secret-portalThe Secret portal backend for sandboxed (Flatpak) apps; credential_store::connect_for_app picks it inside a sandbox
oauthOAuth 2.0 with PKCE through the system browser
mail-transportlibcurl SMTP and IMAP transport
archiveArchive extraction through the system libarchive
spell-checkSpelling dictionaries through Enchant, or Hunspell dictionaries read directly
extension-packageExtension packages: manifest, admission, store, worker protocol
desktop-iconsFreedesktop icon theme lookup
desktop-icon-portalIcon lookup through the portal; implies desktop-icons

enzui-resources

FeatureKindWhat it turns on
curl-transportdefaultHTTP(S) loading through the system libcurl
heifopt-inHEIC decoding through a runtime-loaded libheif
local-imagesopt-inImages from local files
first-frame-previewsopt-inGIF and APNG posters from their first frame
derived-previewsopt-inPreviews derived from other media
image-opsopt-inImageOperations: crop, encode and strip metadata

Other crates

CrateFeatureKindWhat it turns on
enzui-clipboard-runtimewayland (default), x11 (opt-in)Backend selectionThe Wayland and X11 clipboards
enzui-clipboard-runtimeimageopt-inClipboard images (PNG between applications)
enzui-activitylauncher-entrydefaultDock progress through com.canonical.Unity.LauncherEntry when the activity socket is unreachable
enzui-terminalx11, waylandopt-inThe window backend, when the crate is built on its own

To build a client with no X11 code at all, turn off the defaults and select wayland on each crate; see Platform support.

Running examples that need a feature

Examples that need an opt-in feature declare it, and Cargo refuses to build them without it:

sh
cargo run -p enzui-widgets --example gallery --features emoji-picker

Examples lists every example with its command.