I’m very excited to use this first post to talk about go-flutter, what it is, why it was created, and how it has evolved.
Before I explain what go-flutter is, let’s start with the famous flutter system overview.
Flutter’s engine takes core technologies, Skia, a 2D graphics rendering library, and Dart, and hosts them in a shell. Different platforms have different shells; for example, there are shells available for Android and iOS.
The Flutter team also exposes an embedder API which allows Flutter’s engine to be used as a library.
The go-flutter project provides a shell that implements the embedder APIs using a single code base that runs on Windows, macOS, and Linux. Achieving cross-platform support from a single codebase was made easy by using Go as the primary programming language.
As the title says, this project was created a year ago, at that time, the embedder API was composed of 180 lines of C. To begin with, I wanted to reproduce a simple example shell created by @chinmaygarde, one of the core maintainer of the Flutter engine. At first, my goal was to learn the Golang programming language, but only after the first commit, I realized that my approach had some advantage over FDE:
FDE is now part of the flutter project, making it the official desktop shell.
I was having fun, so I kept going, implementing features after feature. (Mostly by reproducing what @stuartmorgan added to FDE).
Fast forward six months later, I was having trouble with my studies/work/go-flutter/life balance, don’t get me wrong, I did receive fantastic input from the community, but it was too much work, the embedder API was growing fast (it now has over 1100 LOC) and my poor Golang architectures decision started to become a burden.
That’s when @GeertJohan showed up and joined the project. We moved the project to an organization and began fixing architecture issues. Support for flutter platform channels codecs/API was implemented, along with support for plugins.
The Hover tool was created to make building go-flutter applications easier.
Additionally, We also had minor input into the Flutter engine project. With go-flutter, we created a reliable unofficial shell that is used by dozens of users. We hope to create better consensus on desktop shells, differences between go-flutter and FDE were found and aligned, which is good. Interaction/discussion between different official/unofficial projects shapes the ‘Google-controlled’ part of the Flutter project.
Overall, I’m very proud of what the project has become. I qualify the project to be very mature. We are now a real alternative to the official desktop shells, with a different approach. Our primary selling points are:
We’d like to thank everyone who has contributed to the project so far. Many people have helped us, not just by writing code but also by testing new features, reporting bugs, giving advice or sharing ideas. Also a big shout-out to the maintainers of the Flutter Engine project who’ve helped us out and shared their feedback. Thanks!
We hope to write more about go-flutter in future posts, to give you updates on the project.