Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents eDock A container runtime for the Mac Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Reference
Ratatosk CLI
Roadmap
RFC 0001: make:resource
RFC 0002: live queries
RFC 0003: MCP server
RFC 0004: MCP resource templates
RFC 0005: a Laravel backend
RFC 0006: Laravel broadcasting
RFC 0007: offline and sync
RFC 0008: Laravel notifications
RFC 0009: Files
RFC 0010: Laravel abilities
RFC 0011: an assistant in the app
RFC 0012: @elyra/ui
RFC 0013: the assistant sees the window
RFC 0014: Elyra Inspector
RFC 0015: presence
RFC 0016: capabilities per window
RFC 0017: record invalidation
RFC 0018: the assistant's answer, streamed
RFC 0019: a window from the tray
RFC 0020: an app that stays in the tray
RFC 0021: a server chosen at sign-in
RFC 0022: signed in to more than one server
RFC 0023: private channels a window listens to
RFC 0024: updates from the backend
RFC 0025: commands and configuration
RFC 0026: the running app, for coding agents
RFC 0027: the assistant's code mode
RFC 0028: the tray's icon, and the app's
RFC 0029: installers
RFC 0030: the app's identity on Windows
RFC 0031: a token per workspace
RFC 0032: the microphone
RFC 0033: diagnostics the user can send
RFC 0034: one screen in several states at once
RFC 0035: point at it, and hand it to the agent
RFC 0036: rata check, the app checked as a whole
RFC 0037: Theme Studio
RFC 0038: edit it in its own app
RFC 0039: a write shown at once in every window
RFC 0040: the two halves agree
RFC 0041: Quick Look
RFC 0042: follow a colleague
RFC 0043: every write seen
RFC 0044: composite keys
RFC 0045: bigint all the way
RFC 0046: pivot columns
RFC 0047: relations on any key
RFC 0048: more providers
RFC 0049: OpenAI web search
RFC 0050: integer-keyed arguments
RFC 0051: citations
RFC 0052: open documents
RFC 0053: exit hooks
RFC 0054: the gui feature
Release notes
Changelog
Elyra
RFC 0054 — The `gui` feature: Elyra without a window

RFC 0054 — The gui feature: Elyra without a window

Status: implemented (2026-11-24) · Target: 0.55.0 · builds on container & providers, commands, MCP, RFC 0053 · see Decisions

Summary

tao and wry (and, on Linux, GTK and WebKitGTK) are hard dependencies of the elyra crate. A command-line tool that shares an app's code (its commands, its database layer, its updater) can't be built without them, so it can't be built on a server, in a minimal container, or anywhere GTK isn't installed. ElyraSQL's elyrasql-cli is that tool. Its fork of the framework has a gui feature for exactly this.

This RFC puts the window behind a gui feature, on by default:

# The app, as today: `gui` is a default feature.
elyra = { …, features = ["database", "updater"] }

# Its command-line twin: no tao, no wry, no GTK.
elyra = { …, default-features = false, features = ["database", "updater"] }
// The CLI: the same commands and services, no event loop.
let app = App::new().provider(Db::provider()).command(export_csv);
let prepared = app.prepare();                       // container, registry, bus
let ctx = prepared.ctx;
let rows = export_csv(ctx.clone(), query).await?;   // or call it by name
  • Without gui, what an app is made of stays: App's configuration, the container and Ctx, commands and their registry, the event bus, codegen, migrations and seeders, --mcp over stdio, the test harness, and the features that need no window (database, http, backend, secrets, ai, updater, sidecar, autostart, microphone).
  • What needs a window goes with it: the event loop, windows, the tray, the menu, the popover, Quick Look, the matrix and Point at it, global shortcuts, and the file dialogs.
  • Nothing changes for an app: gui is a default feature, and tray, shortcuts and system imply it.

Motivation

  • ElyraSQL ships elyrasql-client (the window) and elyrasql-cli (scripts, CI, servers) from one crate. The CLI must build where GTK doesn't exist. Moving off its fork needs this upstream.
  • Any app with a CLI twin, a server-side worker or a headless test job sharing its commands gets the same: cargo build without system webview packages.
  • It's mostly there already. --mcp, ELYRA_CODEGEN_OUT, ELYRA_MIGRATE, ELYRA_SEED and ELYRA_CHECK all run without opening a window. TestShell drives the IPC router without a webview. Only the crate's dependencies say otherwise.

Current state (0.53)

  • framework/Cargo.toml: tao and wry are unconditional. On Linux, so are muda (with gtk), webkit2gtk, gio and cairo-rs; on macOS the objc2-* crates for the popover and snapshots; on Windows webview2-com. default = [].
  • Thirteen source files name tao or wry. Most are in shell/, plus window.rs, dev.rs, diagnostics.rs and app.rs.
  • The IPC layer (shell/router.rs, guard.rs, protocol.rs) uses only wry::http, which is the http crate re-exported. shell/mod.rs keys windows by tao::window::WindowId.
  • Prepared carries windows, tray, menu, icon and shortcuts.
  • system pulls in rfd (file dialogs, GTK on Linux) along with open, arboard, notify-rust and dirs.

Design

Features

[features]
default = ["gui"]
# The window: tao, wry and the system webview (WebKitGTK on Linux), the
# app menu, and the platform crates the shell uses.
gui = ["dep:tao", "dep:wry", "dep:muda", "dep:webkit2gtk", "dep:gio", "dep:cairo-rs",
       "dep:objc2", "dep:objc2-app-kit", "dep:objc2-foundation", "dep:objc2-web-kit",
       "dep:block2", "dep:webview2-com"]
tray = ["gui", "dep:tray-icon"]
shortcuts = ["gui", "dep:global-hotkey"]
system = ["gui", "dep:rfd", "dep:open", "dep:arboard", "dep:notify-rust", "dep:dirs"]

The platform crates become optional under their [target.…] tables. The http crate becomes a direct dependency (it already is one, through wry), so the IPC layer names it, not wry::http.

What moves behind gui

  • shell/webview.rs, shell/picture.rs, shell/dev.rs, shell/diagnose.rs (the event loop, the windows, the snapshots).
  • window.rs (Windows, WindowConfig's runtime half), tray.rs, menu.rs, popover.rs, matrix.rs, point.rs, the shortcuts, the Quick Look parts, the badge and the window icon.
  • App's builder methods for them (window, size, tray, menu, popover, stay_in_tray, shortcut, matrix, icon, …), and Prepared's matching fields.
  • The routes that act on a window (/__window/*, Quick Look, the popover) answer "this build has no window" without gui, rather than not compiling, so the router stays one piece.

The window's description (WindowConfig's label, path, scope and abilities) stays, because a window's scope is part of the IPC security model that TestShell exercises.

What stays without gui

The router, the guard, the protocol, TestShell, the client ids (Clients keyed by an opaque id instead of tao's WindowId), the event bus, live queries, the inspector's data, codegen, --mcp, rata check's ELYRA_CHECK, migrations and seeders, and the exit hooks of RFC 0053.

App::run without gui

It still runs every headless mode (ELYRA_CODEGEN_OUT, ELYRA_MIGRATE, ELYRA_SEED, ELYRA_CHECK, ELYRA_BUNDLE_INSPECT, --mcp). Otherwise it returns Error::Config("this build has no window: elyra's gui feature is off") instead of opening one. A CLI calls App::prepare() and uses its Ctx, or --mcp.

Calling commands without a page

Prepared gets call(name, args) -> Result<Value>, the same dispatch (middleware, validation, abilities against the app's own grants) the router uses, for a CLI that wants its commands by name. A CLI can also call the Rust functions directly. call is for a tool that takes a command name from its own arguments (open question 3).

Testing

  • CI: a Linux job on a runner without the webview packages builds and tests elyra with --no-default-features --features database,http,backend,secrets,ai,updater,sidecar. If anything still pulls in GTK, the build fails at link time.
  • cargo hack --each-feature-style checks for the features that imply gui, so each combination compiles.
  • A small examples/cli.rs: prepare, call a command, print. It's built and run in that job.
  • The existing suites run unchanged with the defaults.

Implementation plan

  1. http as a direct dependency; the IPC layer stops naming wry::http. Clients keyed by an opaque id. This is a no-op refactor that lands first.
  2. The features and optional dependencies. #[cfg(feature = "gui")] on the modules, App methods and Prepared fields above, and the no-window answers for window routes.
  3. App::run without gui; Prepared::call.
  4. The CI job, the example, docs (getting-started, a "Without a window" section in architecture.md, the feature table in the README and configuration.md), CHANGELOG.

Open questions

Answered in Decisions.

  1. gui as a default feature, or explicit? Recommendation: default. Every app today has a window, and cargo add should keep giving one. A CLI opts out with default-features = false, which is the usual Rust way to ask for less.
  2. system without dialogs: split it so a CLI keeps open, clipboard, notifications and dirs without rfd (GTK on Linux)? Recommendation: not now: system implies gui. Notifications and the clipboard need a desktop session anyway. A CLI that wants dirs uses the crate. If a headless use for part of system turns up, it gets its own feature then.
  3. Prepared::call by name: worth it, or should a CLI call the Rust functions? Recommendation: add it. It's a thin wrapper over the dispatch the router has, and it gives a CLI the app's middleware, validation and abilities. Calling the function directly skips all three, which is right for some tools and wrong for others.
  4. The crate's docs on docs.rs-style builds: document every feature together (--all-features), as cargo doc in CI already does. Recommendation: yes, with #[cfg_attr(docsrs, doc(cfg(feature = "gui")))] on what needs it, so the docs say what needs a window.

Not in this RFC

  • A headless browser (rendering pages without a window).
  • elyra-macros and elyra-db changes: neither depends on the window.
  • rata itself, which is a separate binary and already has no webview.

Alternatives considered

  • Splitting the crate (elyra-core + elyra): a cleaner line, but every app's imports and every doc page would move, for what a feature gives without either.
  • The CLI depends on elyra-db alone: works for the database, but not for the commands, the container, the updater or MCP, which is what ElyraSQL shares.

As built

As designed, with these specifics:

  • App's builder methods stay without gui: the window, tray, menu and popover methods only configure, and without a window nothing reads what they set. So an app and its command-line twin can share one App::new()… builder, which is what ElyraSQL needs, and Prepared's fields stay too. tray, system and shortcuts, whose crates need a desktop, turn gui on.
  • Two stand-ins in window.rs: NativeId (tao's WindowId with the window, an empty enum without) and Proxy (tao's EventLoopProxy, or an empty enum whose send_event can't be called). The code that only passes them along (Windows, the dev endpoint, Clients) compiles unchanged. Windows is never bound without a window, so a route that acts on one finds none, as it would in a test.
  • What's behind gui: shell/webview.rs (the event loop), and in debug builds shell/picture.rs and shell/dev.rs; App::run_window (the part of run that opens the loop); wry::webview_version in the diagnostics; the agent's script in TestShell::page_scripts. The optional dependencies are tao, wry, muda (also its general entry, which made GTK a dependency on Linux), webkit2gtk, gio, cairo-rs, the objc2 crates and webview2-com.
  • http as http-types (http_types in the code): the IPC layer and TestShell name it rather than wry::http, and elyra::testing::http re-exports it. The integration tests use that.
  • Lints without gui: much of what serves the window is unreachable there, so the crate allows dead_code, unused_imports, unused_variables and unreachable_code in that configuration only. The default build, with the window, is held to -D warnings as before; the headless CI job runs clippy with -D warnings too.
  • No doc(cfg): nothing public is behind gui (decision 4 had nothing to mark), and the features that need a window already say so.
  • Prepared::call is generic over the result (serde_json::Value for a twin that prints it) and refuses an ability the app doesn't grant its page, with the guard's message.
  • Tests: framework/tests/headless.rs (calls by name, an ability refused and granted, an unknown command, bad arguments, and run without a window) runs in both configurations. The whole suite passes without gui (--features database,http,backend,secrets,ai,updater, sidecar,autostart,microphone); dev_agent.rs needs the window. CI's headless job installs only D-Bus, ALSA, OpenSSL and pkg-config, checks the tree for tao, wry, muda, GTK, WebKitGTK, rfd, tray-icon and global-hotkey, and runs clippy, the tests and examples/cli.rs.

Decisions

  1. gui is a default feature; a CLI opts out with default-features = false.
  2. system implies gui and isn't split now.
  3. Prepared::call(name, args), through the router's dispatch (middleware, validation, abilities).
  4. The docs say what needs a window, with doc(cfg(feature = "gui")).