FIDL

121 views
Skip to first unread message

ged...@gmail.com

unread,
May 4, 2018, 3:07:43 PM5/4/18
to Flutter Dev
FIDL in fuchsia is a great way to do IPC and supports rust and golang.

If there any chance it will be used in flutter for mobile and desktop.

I know this is an open question but compared to the current options it's a way better approach for writing modules.

It could be of course that it is total unsuited to the flutter plugin context but I just wanted to raise it.

At the moment when I do a plug-in where I need to share logic and other things between server and mobile I write it in rust or golang.

Anyway hope I have explained my question...

Adam Barth

unread,
May 4, 2018, 5:00:09 PM5/4/18
to ged...@gmail.com, Flutter Dev
FIDL (see https://fuchsia.googlesource.com/zircon/+/master/docs/fidl/index.md for those who aren't familiar with it) depends on a number of operating system primitives that are Fuchsia-specific.  It might be possible to re-use some of the encoding/decoding machinery, but the message transport is build on top of "channels" (see https://fuchsia.googlesource.com/zircon/+/master/docs/objects/channel.md), which are Fuchsia-specific kernel objects.

If you're just interested in cross-language serialization / deserialization, you might be interested in FlatBuffers (see https://google.github.io/flatbuffers/) or some other technology that focuses on that aspect of the problem.  (I guess FlatBuffers specifically doesn't support Dart or Rust yet, but presumably they'd be open to contributions along those lines.)

Digging into this topic a bit, it looks like you've already found <https://github.com/google/flatbuffers/issues/4487>.

Adam


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ged Wed

unread,
May 4, 2018, 6:32:13 PM5/4/18
to Adam Barth, Flutter Dev
Thanks for the explanation. Now I know. Will try flat buffers. I use protobuf for serialisation normally but will try flat buffers.

ged...@gmail.com

unread,
May 16, 2018, 3:43:08 PM5/16/18
to Flutter Dev
In the end I wrote a rpc plugin for flutter.

It's just json passing between the flutter code and the golang code using an agnostic java and swift plugin.

So it's quick to bring in new golang code.

It's really helped the team speed up and just concentrate on the flutter code and golang logic.

Next I can change it to use protobufs which should speed things up.
Also from the .proto I can code generate strongly typed dart code to pick up regressions in the dart code when the golang code is changed.

Reply all
Reply to author
Forward
0 new messages