Flutter engine based ui framework

Sebastiaan Koppe mail at skoppe.eu
Thu Jan 16 09:21:32 UTC 2020


On Tuesday, 14 January 2020 at 15:01:06 UTC, Dukc wrote:
> On Tuesday, 14 January 2020 at 12:01:05 UTC, Ola Fosheim 
> Grøstad wrote:
>> Yes, although it makes more sense to do all the UI stuff in 
>> Dart and instead use other languages as "service providers".
>
> I'm sceptical of that. I do basically the same with Bridge.Net 
> (with the difference that big part of "services" code is also 
> in C#). This isn't a design decision, the architechture is this 
> way because spasm didn't exist yet when I started, D was added 
> later.
>
> And I can tell you that interfacing D-borne wasm with 
> Bridge.Net is a low of work. D code can't take or pass 
> JavaScript objects directly due to how WASM is designed, only 
> their indexes if they are positioned in a purpose-built global 
> array.

Isn't that what the webidl bindings generator does? It takes the 
definitions and generates D bindings and wrappers, JS code and 
glues everything together. You can add your own webidl files to 
generate D and JS glue code to interface with other things. 
(Although with Bridge.NET you have to take into account how they 
transpile C# to JS, complicating matters, but given a JS wrapper 
around Bridge.NET it might be possible).

With my (unfinished) typescript binding generator I am doing the 
same thing as from webidl, but instead it is based on typescript 
files, so you can interface D with typescript libraries (or JS 
libraries with ts typings).

> This means that if you want to call your D functions in any 
> easily readable way, you have to develop an automatic interface 
> template in the ui language - introspection capabilites of D 
> will not help.

Calling D functions isn't so well supported in my webidl bindings 
generator, except for delegates which are used for callbacks. But 
we can definitely fix that.


More information about the Digitalmars-d mailing list