A fast terminal for TUIs — and the SDK to build your own, cross-platform
▲ 9 r/coolgithubprojects+1 crossposts

A fast terminal for TUIs — and the SDK to build your own, cross-platform

We just shipped a terminal for Linux, macOS and Windows. Apache-2.0, one file to install: https://starling.build/terminal.html

Speed. Ten workloads at steady state, matched fonts and verified grids, measured against the fastest terminal on each platform:
• Linux: 1.38x the ghostty nightly
• macOS: 1.28x ghostty
• Windows: 1.41x Windows Terminal

Efficiency, which matters more for TUIs. All of that on about half the CPU — 0.44x to 0.53x of the other terminal across the three platforms. Memory is flat no matter how much has scrolled past: on Windows we measure 73 MB against Windows Terminal’s 1,026 MB for identical work.

For full-screen apps specifically: alt screen is 1.06x ghostty on Linux and 1.87x Windows Terminal, and DOOM-Fire — which repaints every cell every frame — runs at ~1,600 fps on Linux.

Side-by-side videos, charts, and the raw per-leg data are on that page.

And you can build your own on the same widget. The terminal ships in our SDK, so a working terminal app is about twenty lines of Swift — emulator, PTY, scrollback, selection, fonts and glyph atlas all inside the widget:

import ExampleHost
import Flutter

let session = TerminalSession()
session.startShell()

runExampleApp(title: "Terminal", width: 940, height: 620) {
TerminalView(session: session)
}

Happy to answer questions.

u/starling-dev — 2 days ago

We shipped a terminal on Flutter’s engine and it beats the hand-written native ones — the C++ engine is better than it gets credit for

We just released a terminal emulator that renders through Flutter’s engine — and at steady state it runs our ten-workload benchmark suite in 0.73x of ghostty’s wall time on Linux and 0.71x of Windows Terminal’s on Windows, at about half the CPU each. ghostty’s renderer is purpose-built for terminals in Zig; Windows Terminal’s is purpose-built in C++. Ours is the same general-purpose engine that draws your Flutter widgets.

https://github.com/starling-build/starling/releases/tag/terminal-v0.1.0 — Apache-2.0, charts and side-by-side videos at https://starling.build/terminal.html

The reason I think this belongs here: it is an unusually clean measurement of what the engine contributes, because we swapped out everything above it. There is no Dart VM in this process — we ported Flutter’s framework layer to Swift and drive the engine’s C/C++ core directly. So the rasteriser, the compositor, the text stack and the GPU path are stock Flutter; the language and the widget layer are not. When the numbers come out ahead of two purpose-built native renderers, that is the engine’s win, not ours.

A terminal is a nastier rendering target than it sounds. Every frame can invalidate the entire screen — 47x201 cells, ~9,400 glyphs, each with its own foreground colour, background, bold/italic/underline, and any script on earth. No dirty-region shortcuts when someone cats a file. DOOM-Fire, which repaints every cell every frame, runs at ~1,600 fps on Linux through this engine. That is the engine’s raster path doing the work.

What actually made it fast: drawRawAtlas. The naive approach — and our first one — was one Paragraph per row, letting the text engine shape and lay out a line of styled runs. It works and it looks right, but you pay shaping for content that never changes shape: a terminal cell is a fixed box with one grapheme in it. So we rasterise each glyph once into a texture atlas and emit the whole grid as a single call:

canvas.drawRawAtlas(atlasImage, transforms, srcRects, colors, BlendMode.dstIn, cullRect, paint)

One textured quad per cell, tinted per quad, no shaping in the frame at all. Measured against the paragraph path at the same frame rate, it costs 44% less CPU. If you are drawing a large grid of repeating glyphs in Dart — a spreadsheet, a hex viewer, a chart with data labels, a code editor — Canvas.drawRawAtlas is available to you and is dramatically cheaper than a Paragraph per row. It is the most useful thing I learned from this project.

u/starling-dev — 3 days ago

starling-build/starling: Starling — a new Linux desktop environment: Swift shell, its own compositor, a Flutter-to-Swift framework port, and first-party apps

Starling is a full Linux DE where the whole desktop — compositor, dock, window manager, apps — is one native Swift program. The unusual parts, in repo terms:
sdk/ — Flutter’s widget framework ported to Swift (element tree, render objects, gesture arena — the framework, not bindings), driving Flutter’s C engine core directly. No Dart VM.

shell/Sources/WaylandServer/ — its own Wayland compositor, ~5k lines of plain C.

shell/Sources/X11Server/ — an in-tree X11 server (DRI3/Present) so legacy apps run too; Chrome, VS Code, Blender, and Zoom run unmodified.

Renders straight through DRM/KMS — no toolkit, no host compositor.

The 0.3.0 release that just shipped adds a workspace mode built for AI agents: the agent drives from its own room, and every window it opens is claimed for that room by client identity — never lands on your desktop. 3:49 unedited demo: https://starling.build/video/agent-workspace.mp4

Also fun: the project is ~7 months of one person directing AI agents, and the .deb ships only after a gate that installs it on a clean Ubuntu 26.04 VM and logs in through real GDM.

Release notes: https://github.com/starling-build/starling/releases/tag/v0.3.0

Happy to answer anything about the compositor, the framework port, or the workflow.

github.com
u/starling-dev — 8 days ago
▲ 2 r/swift

Starling SDK 0.2.0 — now on Windows as well as Linux

Starling SDK is Flutter’s framework ported to Swift, running directly on the Flutter engine’s C core. No Dart in your project — you write the widget tree in Swift.
Column(mainAxisAlignment: .center) {
Text("Hello from the Starling SDK", style: TextStyle(fontSize: 30))
SizedBox(height: 18)
GestureDetector(onTap: { setState { taps += 1 } }) {
Text("Tap me")
}
}

Your application writing in Starling sdk will run on Windows and Linux.
Getting started (both platforms): https://starling.build/start.html
Release: https://github.com/starling-build/starling/releases/tag/sdk-v0.2.0

reddit.com
u/starling-dev — 14 days ago
▲ 4 r/u_starling-dev+1 crossposts

Starling SDK 0.2.0 — now on Windows as well as Linux

Starling SDK is Flutter’s framework ported to Swift, running directly on the Flutter engine’s C core. No Dart in your project — you write the widget tree in Swift:

Column(mainAxisAlignment: .center) {
Text("Hello from the Starling SDK", style: TextStyle(fontSize: 30))
SizedBox(height: 18)
GestureDetector(onTap: { setState { taps += 1 } }) {
Text("Tap me")
}
}

New in 0.2.0 is a Windows bundle. Apps are hosted by the engine’s own Win32 embedder (flutter_windows.dll) driven in Swift mode, so windowing, input, IME and accessibility come from the same code path real Flutter Windows apps use — the same arrangement as the GTK host on Linux. The framework itself turned out to be remarkably portable: across all 325 files of the framework sources, exactly one real compile error (M_E, which the UCRT hides).

It ships as a download-and-point bundle — the framework plus the engine binaries it links against, in one tree. Unpack it, add a path dependency, swift build.

Getting started (both platforms): https://starling.build/start.html
Release: https://github.com/starling-build/starling/releases/tag/sdk-v0.2.0

reddit.com
u/starling-dev — 14 days ago
▲ 3 r/u_starling-dev+1 crossposts

Starling 0.2.3 is out

Starling 0.2.3 — what’s new:
• Screen recording — whole screen or one window, hardware-encoded
• Control centre
• Notifications
• Task Manager
• A video player that decodes on the GPU
• Terminal ~4x faster
4-min demo, recorded by the desktop itself:
https://starling.build

reddit.com
u/starling-dev — 14 days ago

The Swift port of Flutter’s framework behind that desktop I posted is now a standalone SDK

A while back I posted the Linux desktop we built on a Swift port of Flutter's framework. The most common question was about the port itself, so: it's now usable on its own, without the desktop.

The framework — widgets, rendering, painting, gestures, animation, semantics — is ported from Dart to Swift, with everything below unchanged: Skia, the text stack, the platform embedders. There's no Dart VM; where the engine would start an isolate it starts a Swift runtime instead. The Linux host is the engine's own GTK embedder, so windowing, input and IME come from the same
code path a normal Flutter Linux app uses.

The port is close to mechanical, so Flutter's concepts carry over intact — StatefulWidget, setState, BuildContext, constraints down and sizes up. Same counter app, same structure. The main difference is Swift's result builders: containers take trailing closures, so `if` and `for` work directly inside a widget tree.

We did it because we're building system software where the language mattered, not because there's anything wrong with Dart. Flutter's the reason any of this was possible.

Linux x86_64 today, macOS next. BSD-3, inherited from Flutter.

https://starling.build/sdk.html
https://github.com/starling-build/starling/tree/main/sdk

reddit.com
u/starling-dev — 17 days ago
▲ 16 r/swift

Starling SDK — Flutter’s framework ported to Swift, for native GUI apps on Linux

We ported Flutter's framework to Swift — widgets, rendering, painting, gestures, animation, semantics — running on Flutter's own C++ engine. No Dart
VM: the engine starts a Swift runtime where it would normally start a Dart isolate.

The result is a declarative, cross-platform GUI framework you can use from Swift today on Linux. Apps run on any ordinary session (GNOME, KDE, X11) through the engine's GTK embedder. If you've used Flutter or SwiftUI the model will be familiar; if you've used neither, Flutter's own docs apply almost
directly.

Trying it is one download — the bundle ships the engine binaries, so there's no engine build. Install, depend on it by path, `swift build`. Tested on Swift
6.2.4 and 6.3.3.

Linux x86_64 today; macOS is next but not yet verified.

Getting started: https://starling.build/start.html
More detail: https://starling.build/sdk.html
Source: https://github.com/starling-build/starling/tree/main/sdk

Built with AI assistance under my direction, in case that matters to you.

reddit.com
u/starling-dev — 17 days ago

[Starling] I wrote the whole desktop environment — compositor, window manager and apps

This isn't a rice — it's a desktop environment I wrote from scratch. I got
tired of configuring one, so I built one.

**Specs**
- **Distro:** Ubuntu 26.04 LTS
- **DE:** Starling (mine — its own Wayland compositor + X11 server, no
existing WM underneath)
- **Compositor:** 5,860 lines of hand-written C — xdg-shell, linux-dmabuf
(zero-copy), viewporter, fractional-scale, pointer-constraints, text-input-v3
- **Shell/apps:** Swift, on a from-scratch port of Flutter's framework
(~222k lines, no Dart VM)
- **Terminal:** mine (real PTY), Roboto Mono
- **Wallpaper:** Golden Gate at dusk (bundled)
- **Bar/dock/launcher:** all mine — dock, Launchpad, Mission Control
- **Source (Apache-2.0):** github.com/starling-build/starling

**How it works:** no X11 or Wayland session underneath — it drives the GPU
directly via DRM/KMS and *is* the display server. It boots as a normal
unprivileged session through GDM. Third-party apps composite as native
clients: Chrome, VS Code, IntelliJ, GIMP, Blender (EEVEE viewport through the
dma-buf path).

Tiling is master-and-stack, toggled from Settings; there are spaces with a
Mission Control overview. Because every window is a widget in the framework,
tiling is just a layout and Mission Control is just an animated grid — it works
on real third-party apps for free.

Early preview (v0.2), so: no screen lock yet, scaling pinned to 2.0, AMD and
virtio-gpu tested. Installs from a .deb: https://starling.build

reddit.com
u/starling-dev — 22 days ago

Nobody had vibe-coded a real operating system desktop. So I did — compositor, window manager, apps. It boots on real hardware.

Every vibe-coding showcase I've seen is a web app. I wanted to know if this approach could build actual systems software — the kind with no framework to
lean on, where you talk to the GPU and the kernel directly.

So over ~6 months, one person directing Claude, I built **Starling**: a complete Linux desktop environment. Not a theme, not a shell script over GNOME — the whole stack, from the display server up.

**What that actually means**

- **Its own Wayland compositor** — 5,860 lines of hand-written C implementing xdg-shell, linux-dmabuf (zero-copy GPU buffer import), viewporter,
fractional-scale, pointer-constraints, text-input-v3, presentation-time and a dozen more protocols.
- **Its own X11 server** — 5,158 lines, DRI3/Present, so legacy X11 apps run too.
- **Its own UI framework** — 221,818 lines of Swift, including a from-scratch port of Flutter's entire framework to Swift. No Dart VM.
- **A window manager** — floating and tiling, spaces, a Mission Control overview, a dock, a Launchpad.
- **First-party apps** — Files, Terminal (real PTY), Settings, Calculator, an App Store that installs software through apt.
- **Packaging** — a 53 MB .deb that installs on stock Ubuntu 26.04.

~233,000 lines total, across C, C++ and Swift.

**Why I say "real"**

It boots as a normal session through GDM, unprivileged — DRM master and input come from logind, not from running as root. It drives the GPU directly via DRM/KMS. There's no X11 or Wayland session under it; it *is* the display server.

And it runs the apps people actually use, as native clients: Chrome, VS Code, IntelliJ IDEA, Slack, GIMP, and Blender — with Blender's EEVEE viewport
rendering through our dma-buf path. That covers Chromium/Electron, Qt6, GTK3, GTK4, and the JetBrains Runtime.

You can install it right now and log into it.

**It's not just my claim** — Phoronix covered it last week:
https://www.phoronix.com/news/Starling-Swift-Desktop

**The honest scope**: it's v0.2, an early preview. Ubuntu 26.04, tested on AMD and virtio-gpu. No screen lock yet, scaling is pinned to 2.0, there are rough edges. It's not replacing your daily driver this month. But it boots, it composites, it runs real software, and it ships.

Try it: https://starling.build
Source, Apache-2.0: https://github.com/starling-build/starling
Why it's architected this way: https://starling.build/why.html

Ask me anything about how it was built.

u/starling-dev — 22 days ago

We ported Flutter’s framework to Swift and built a Linux desktop environment on it (no Dart VM)

Sharing something unusual: Starling, a Linux desktop environment — shell,
window manager, its own Wayland compositor, first-party apps — where the
entire UI layer is a from-scratch port of Flutter's *framework* to Swift, running on Flutter's *engine* C core. No Dart VM.

The part I think is genuinely interesting to this community isn't Swift. It's what it says about Flutter's architecture: the embedder API is a clean enough seam that you can replace the whole framework layer above it and the engine
doesn't care. Skia, the compositor, the raster/UI thread model, the platform channels — all of it kept working while Dart went away.

The port follows the framework's own structure (Widgets, Rendering, Painting, Gestures, Animation, Scheduler, Semantics), and the API is deliberately
recognizable:

override func build(_ context: any BuildContext) -> Widget {
return DecoratedBox(
decoration: BoxDecoration(color: pal.background),
child: Column(children: [
Expanded(flex: 4, child: _display()),
Expanded(flex: 3, child: _row([...])),
]))
}

StatelessWidget, StatefulWidget, State, BuildContext, Element, InheritedWidget — same concepts, same lifecycle, ~190k lines of Swift.

It also runs on a **DRM/KMS embedder**: no X11, no Wayland client, no windowmanager under it. Flutter drives the GPU directly and *is* the display server —
the desktop composites real third-party apps (Chrome, VS Code, IntelliJ, GIMP, Blender) as Wayland/X11 clients into the widget tree. Once another app's window is a widget, tiling is a layout and Mission Control is an animated grid.

Why not just use Dart? Fair question, and the honest answer is that this is a system component: it spawns and supervises child processes, talks DRM/KMS,
libinput, dma-buf and D-Bus, and lives or dies on C interop. That's a job the Dart FFI could do but Swift does more naturally, and it let the shell and the
framework be one language end to end. It's a trade, not a verdict on Dart —and the engine being reusable *unchanged* is the point I'd want a Flutter dev to take away.

Early preview, honest about it: v0.2, Ubuntu 26.04, AMD + virtio-gpu tested,
scaling pinned to 2.0. Also worth stating plainly: it was largely written by AI
(Claude) under my direction.

Site + screenshots: https://starling.build
Architecture rationale: https://starling.build/why.html
Source (Apache-2.0): https://github.com/starling-build/starling

Happy to go deep on the embedder, the framework port, or how much of the
engine we had to touch (less than you'd think).

reddit.com
u/starling-dev — 22 days ago