r/FlutterDev • u/SpecialistServe3974 • 4d ago
Article rlutter - rust based shell utilizing wgpu and winit
Repo: https://github.com/nrbnlulu/flutter (branch rust/flutter-rs-shell)
What it gives you over the native shells
-
One shell, written in Rust. Windowing, input, IME, lifecycle and multi-window all live in one Rust runtime built on
winit. The native setup has a separate C++/Java embedder per OS and a checked-inlinux/,windows/orandroid/folder in every app. Here the runner is generated and built with Cargo. -
wgpu as a first-class GPU API for plugins. wgpu owns the Vulkan device and surface, and Impeller renders on that same device. Plugins get a typed SDK (
flutter-plugin-sdk) for:- Zero-copy GPU textures: you render into a wgpu texture ring, call
present(), and Flutter samples the texture with no readback and no widget rebuild. - CPU pixel buffers with backpressure, for software decoders, emulators and similar sources.
- Android
AHardwareBuffertextures: hardware-decoded H.264 video plays straight into Flutter.
This makes video players, map/GIS renderers and 3D engines much easier to embed than with the platform-specific texture APIs.
- Zero-copy GPU textures: you render into a wgpu texture ring, call
-
Rust plugins are plain Cargo dependencies. The Flutter tool finds them in your pub graph and wires them into the runner. They're compatible with
flutter_rust_bridge, and a worker-safe main-thread dispatcher is included. -
Real multi-window. All five window kinds (regular, dialog, popup, tooltip, satellite) share one engine and isolate, using Flutter's experimental windowing API. On Wayland, popups and tooltips are real
xdg_popups. -
Headless mode and agent control.
rlutter run --headlessrenders real frames with no display server at all, including on llvmpipe.rlutter mcp --stdioexposes an MCP server that lets an AI agent (or a CI script) launch your app, read the semantics tree, tap and type, make assertions, take screenshots and record video. -
Normal Flutter dev loop.
flutter run -d rustsupports hot reload, debugger attach and VS Code F5, and has debug and release (AOT) builds.
Platform support
| Platform | Status |
|---|---|
| Linux x64 (Wayland + X11) | ✅ Most complete: debug, release, multi-window, textures, headless/MCP |
| Windows x64 | ✅ Debug + release/AOT, multi-window (dialogs, popups, tooltips), textures, FRB |
| Android | 🧪 Experimental: debug + release APKs via FlutterActivity, Java/Kotlin plugins, Rust textures, AHardwareBuffer video |
| Web | ⏳ Planned |
| macOS / iOS | ⏳ Planned, after web |
Headless/MCP agent control is Linux-only for now. Linux profile mode is still in progress.
Try it
# Linux
curl -fsSL https://raw.githubusercontent.com/nrbnlulu/flutter/rust/flutter-rs-shell/engine/src/flutter/shell/platform/rust/install.sh | sh
# Windows PowerShell
irm https://raw.githubusercontent.com/nrbnlulu/flutter/rust/flutter-rs-shell/engine/src/flutter/shell/platform/rust/install.ps1 | iex
Prebuilt engine SDKs come from a rolling BETA GitHub release, so you don't need to build the engine yourself.
Caveats
- It's a fork and uses private engine interfaces, in lockstep with the Flutter revision. The public Embedder API can't yet do Vulkan/Impeller multi-view compositing with async GPU handoff. I'll revisit that once upstream supports it.
- There's no stable plugin ABI. Rust plugins compile from source.
- It's BETA. Expect rough edges, especially on Android.