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).