Flutter engine based ui framework

Dukc ajieskola at gmail.com
Tue Jan 14 11:38:44 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 ?

You might be interested in a binding to Nuklear[1]. Nuklear is 
completely decoupled from enviroment, so at least in theory it 
should work on every platform there is a low-level windowing 
library. It does not automatically bind to interface of any 
library, which means user code needs to include glue, but also 
makes the backend interface agnostic so you can use any windowing 
library just as well: glfw, sdl, sfml, cocoa, arsd.simpledisplay, 
HTMLCanvasElement or whatever. For mobile platforms, the widgets 
might require some redesign, but it should be doable without 
changing the UI invoking code, assuming it does not rely on e.g 
mouse movements.

GPU acceleration is also there. It's drawing can also be bound to 
OpenGL one wants to. I'm not sure if it could use 
Vulkan/Metal/DirectX/BGFX with no-compromise performance, but I 
wouldn't be surprised.

I have recently started to use it and the best thing I like about 
it that it won't steal any control away from the user. It'll let 
you to access the window pixels directly just as happily as your 
windowing library. And where most GUI libraries take control of 
the app and run your code when they deem they have to, Nuklear 
processes events and draws stuff only when you command it. Stop 
invoking it, and there is nothing happening in the background.

If libraries like this continue to develop, I think that soon the 
only points for using traditional widget libraries are that you 
either want the backend to make native widgets (including HTML), 
or need a non-graphical backend, like a console GUI you can 
design with DLangUI. And AFAIK neither of these two features are 
currently terriby common in widget libraries anyway.

1: https://code.dlang.org/packages/bindbc-nuklear


More information about the Digitalmars-d mailing list