Flutter engine based ui framework

Petar Petar
Sun Jan 12 15:39:47 UTC 2020

On Sunday, 12 January 2020 at 14:15:35 UTC, Newbie2019 wrote:
> Flutter engine is written by C++, original for Flutter 
> framework based on Dark language.
> But there is project to rewrite Flutter framework in TypeScript 
> and C++ language, so they can developer mobile and desktop and 
> IOT UI framework from TypeScript and C++.
> They are cross platform (for android, IOS, window & macOS & 
> linux) with native GPU acceleration UI framework.
> examples: https://github.com/TGIF-iMatrix/MXFlutter  (and there 
> also C++ and IOT project, I just cant find it)
> The Alibaba ( biggest electronic business platform in China) 
> use flutter to build they mobile
>  app 
> https://play.google.com/store/apps/details?id=com.taobao.idlefish
> D has native C++ ABI support, is there any one interested to 
> implement flutter framework on D language ?

At work, I started researching the available frameworks for 
cross-platform mobile development in the beginning of 2019, and I 
looked at various things such as Xamarin, Native Script and React 
Native, before I stumbled upon Flutter. The biggest requirement 
for us was solid performance and total control over every pixel 
on the screen (we're going for a custom design language system, 
and not native look and feel) and naturally Flutter fit the bill 
very nicely. Since then then we built two prototypes in it and 
overall I can say that I like the framework and the development 
experience, but Dart feels much less expressive than TypeScript 
(and of course it can't even be compared to D).

For quite a while I have been meaning to create my UI framework 
with D, with the following goals:
* GPU rendering, based on Vulkan, WebGL (or in the future 
WebGPU). No plans for DirectX as Vulkan covers everything I need 
on Windows and MoltenVK provides a Vulkan API based on Metal for 

* Cross-platform:
Start with Linux (as it's the platform I mainly care about) with 
wayland (not sure about xcb right now) and soon after add Windows 
support based on user32.dll (no short-term plans for UWP). Add 
Android support based on Adam D. Ruppe's amazing work some time 
later. Look into using WebAssembly to provide a WebGL version, 
based on Sebastiaan Koppe's also amazing work.

* Start with a low-level API - windows and basic drawing - 
similar to the level of skia [1]. See how far I can go with @nogc.

* End-goal: high-level functional-style API, similar to Elm, 
React.js and Flutter. For state-management I have experience with 
RX [3] and Redux [4][5], but I also recently started looking to 
@ngrx/data [6] for inspiration. I have several years of 
professional experience with WPF/SL and MVVM, but I really want 
run away from that, in terms of API design.

Since I have very limited free time to create everything from 
scratch I decided to start by making a wrapper for libskia. So 
far I have the C API done [2]. I haven't tested it completely, 
but as far I remember I had all the C headers translated. 
However, AFAIK, it is much more limited than the native C++ API. 
I think I'll stick to the C API for a while, polish my work and 
push it to code.dlang.org. I would see how far I can reach, 
before I would need to go for the C++ API.

[1]: https://skia.org/
[2]: https://github.com/PetarKirov/skia-d
[3]: http://reactivex.io/
[4]: https://redux.js.org/
[5]: https://redux-observable.js.org/
[6]: https://ngrx.io/guide/data

More information about the Digitalmars-d mailing list