Documentation
Architecture
29 focused crates, a dirty-driven GPU frame loop, and a per-host daemon any client can attach to.
toowl is a Cargo workspace of 29 focused crates (edition
2024, no dependency cycles, nothing depends on toowl-app). It
splits into two tiers: the client — a GPU desktop app or a
crossterm TUI — and the daemon (toowld) that
owns your workspaces and long-running sessions.
Clients, transports, and the daemon
Any client reaches a per-host toowld over the
Transport trait — a Unix socket locally, SSH-stdio for a remote
box, or a WebSocket for the browser. The daemon owns a tree of
workspaces → sessions → PTYs; closing a window detaches,
reopening reattaches, and the shells underneath never stop.
The frame loop (and why it's fast)
A dedicated thread reads each PTY into a channel. Once per frame,
tick() drains every pane's channel, feeds the bytes through the
vte parser into the grid, and marks changed rows dirty. The renderer then
runs one GPU pass per pane (cell background → underline →
glyph → cursor) plus a single chrome pass for tabs and overlays.
- PTY thread reads bytes
- channel crossbeam
- tick() drain + parse
- grid dirty rows
- render 1 pass/pane + chrome
- present wgpu surface
The 29 crates
Each crate's lib.rs re-exports only what its consumers need, so
the public surface stays small and the dependency graph stays acyclic.
toowl-app The binary — event routing, action dispatch, window + plugin host.
toowl-render wgpu renderer: glyph atlas, one pass per pane + a chrome pass.
toowl-widgets Panel trait + palette, settings, search, context menu.
toowl-input The Action enum (feature dictionary), keymaps, key parsing.
toowl-vt vte parser → SGR/cursor/erase, OSC 7/8/133, Kitty graphics.
toowl-grid Cells, scrollback, selection, reflow-on-resize, command marks.
toowl-pty Portable PTY wrapper with a dedicated read thread.
toowl-config TOML schema + state.json, atomic save, 150ms hot-reload watcher.
toowl-theme 6 flagship themes + by_name lookup.
toowl-font cosmic-text + swash CPU rasterizer, lazy face loading.
toowl-macos AppKit runloop, Liquid Glass titlebar, cwd lookup.
toowl-windows DWM Mica/Acrylic, rounded corners, dark title bar.
toowl-plugin Plugin trait, View tree, HostApi, PluginEvent.
toowl-plugin-claude The Claude Feather: session list + crash banner.
toowl-plugin-nest cwd-synced file browser Feather.
toowl-plugin-mcp MCP Hub — hot-start Model Context Protocol servers.
toowl-plugin-scout Web search Feather.
toowl-plugin-subprocess JSON-RPC subprocess adapter + crash-restart watchdog.
toowl-plugin-remotes Remote Machines Feather — host switcher.
toowl-plugin-workspaces Workspaces Feather — open/save named workspaces.
toowl-plugin-roost Daemon-aware Feather surface.
toowl-roost-daemon The toowld daemon: per-host workspace + session owner.
toowl-roost-proto Typed wire protocol shared with clients.
toowl-roost-client Unix-socket + SSH-stdio + WebSocket Transport impls.
toowl-tui crossterm client — talks to toowld via Transport.
toowl-cli toowl up <name> dispatcher + singleton-IPC shim.
toowl-updater GitHub-Releases-driven in-app updater.
toowl-aviary-format Signed Feather package format.
toowl-aviary-client Aviary registry client.
Two clients, one binary
The same source builds two ways. A desktop build pulls in wgpu and winit; a server build drops them entirely:
# Desktop (GUI + TUI)
cargo build --release
# Headless server (TUI only, no GPU deps)
cargo build --release --no-default-features --features tui
At runtime the toowl binary auto-detects: a GPU window where
there's a display, a tmux-style crossterm client over SSH or on a headless
host. Both share the exact same vte parser and grid, so terminal behavior is
identical everywhere.
Feathers (the plugin tier)
Extensions are Feathers. A plugin implements the
Plugin trait, describes its UI as a View tree, and
talks to the host through HostApi. Feathers hot-start when you
open the Perch (so they cost nothing at launch) and can be stopped and
started without a restart. In-workspace first-party Feathers — Claude, Nest,
MCP Hub, Scout — ship in the binary; signed third-party Feathers install from
the Aviary.
Go deeper
- Workspaces — the daemon-backed window model.
- TUI client and Remote machines — the Transport trait in practice.
- Feathers — the plugin host and how to build one.
- Performance — the cold-start budget and how it's enforced.