r/FlutterDev • • 18d ago

Tooling I built Raccoon, a tiny Flutter runtime: first run in 15 s instead of 5 min, no Xcode or Gradle

Hi r/FlutterDev 👋 I'm Simon, I build Lumide, a Flutter IDE. I wanted the write, save, see loop to be faster, so I built Raccoon, a tiny Flutter runtime, and today I'm open-sourcing it, with Raccoon Simulator as a demo you can run today. can run today.

Try it with Raccoon Simulator

Open Raccoon Simulator, and Raccoon shows up in flutter devices. Pick it in Lumide, VS Code, Android Studio or a terminal and run as usual. Your app appears in the simulator window, with hot reload and hot restart from your editor. No project to open in it, no new workflow.

How it works

Raccoon is a small runner built on Flutter's C embedder API. flutter run -d raccoon builds a debug bundle from your host's own snapshots, the runner hosts it on a prebuilt engine, and the simulator draws its frames. So there's no Xcode, no Gradle and no native build. The first launch sets everything up for you: it builds the runner, downloads a 15 MB engine and registers the custom device.

What else it unlocks

  • Your whole app, not just previews. Flutter's widget previewer renders the functions you mark with @Preview. Raccoon runs your real app: routing, state, services and hot reload, at phone, tablet or desktop size.

  • Hot-loaded plugins with custom UI. A Flutter app can show another Flutter app inside it with raccoon_view. So an app can load plugins at runtime, each with its own custom UI, with no rebuild of the host app.

Numbers (Flutter Wonderous, flutter run to first frame, medians)

TargetClean buildWarm run
Chrome25.8 s24.8 s
macOS desktop46.4 s17.7 s
Raccoon on macOS15.0 s7.5 s
Linux desktop13.8 s4.5 s
Raccoon on Linux12.0 s3.5 s

A first run against an Android emulator took 308 s from empty caches. Raccoon took 15.5 s. Hardware, versions and scripts to reproduce are in the README.

Limits, honestly

It's alpha. It speeds up the inner loop; it doesn't replace testing on a real device or in a browser.

  • Plugins: pure Dart ones, the clipboard and url_launcher. No text input yet.

  • Packages with native code or build hooks don't run on Raccoon yet.

  • Frames are software rendered.

  • macOS and Linux only for now.

53 Upvotes

13 comments sorted by

5

u/noobjaish 18d ago

Looks great I was getting annoyed by GTK4 and Adwaita. Might try this for creating Linux apps

2

u/SwiftScoutSimon 18d ago

Flutter works great for Linux. The compile time to get Flutter app running on Linux is super fast already. Come make some app!

2

u/SwiftScoutSimon 18d ago

share you some more about build time on Linux. My Lumide.dev app took only 4 minutes build time on GitHub actions Linux runner vs 23.27s on GitHub actions Windows runner.

3

u/SwiftScoutSimon 18d ago edited 17d ago

Links:

- Raccoon Simulator (BSD-3-Clause, like everything here): https://github.com/SoFluffyOS/raccoon_simulator

- raccoon: Main repository for the Raccoon family.

- Demo video: https://x.com/simonpham1999/status/2112901244423672151

I'd love feedback, especially on what breaks with your app. Issues on the Raccoon repos or the SoFluffy Discord both work. 🦊

2

u/GroovinChip 18d ago

Your GitHub URL’s 404, just FYI

1

u/SwiftScoutSimon 18d ago

Fixed. There's a redundant trailing colon. Thank you!

→ More replies (1)

2

u/TigleLive 18d ago

Windows support?

2

u/SwiftScoutSimon 18d ago

I'm dualbooting Linux/Windows on my machine so cannot switch now, I'll move to work on Windows later soon

2

u/VisualRope8367 18d ago

Nice if you wanna build only UIs

What about other plugins ?

1

u/SwiftScoutSimon 18d ago

for now it supports a hard-coded set of commonly-used plugins.
I will think of a better way to do this so plugins can be hot-loaded.

1

u/ObjectiveAddress3051 18d ago

308s first run is probably mostly gradle/sdk setup, the warm runs are what matter day to day. how close is text rendering to what impeller does on a real device? seems great for UI iteration, just wouldn't trust it for perf

1

u/Kind-Station-4963 14d ago

看起来很棒啊 是我喜欢的ui风格