14 ms·
> FFI is quite a PITA This is what made me nope out of it last time I experimented with a Flutter module in my app. I'm still watching it closely though as it
by jamil7 6y ago
> FFI is quite a PITA
This is what made me nope out of it last time I experimented with a Flutter module in my app. I'm still watching it closely though as it could be a great fit for other projects.
- kjksf 6y agoThis might be outdated opinion (hard to tell without OP explaining what he finds "a PITA"). dart:ffi (https://dart.dev/guides/libraries/c-interop https://dart.dev/guides/libraries/c-interop) is a recent addition to Dart and from where I stand it's a decent FFI system. Maybe not as good as PInvoke in C# or ffi in luajit but better than, say, jni in Java (and any other FFI system that requires you to write glue code in C i.e. python, ruby, nodejs).
- malkia 6y agogood thing to have in an FFI system is ability from one language to call another from callback, and back and forth (if it need to). I believe Dart allows for that. That to be said, stack walking is going to be painful to decode (probably), best I've seen is C#/C++ on Windows - where it flows naturally from one to another.
- jamil7 6y agoThanks good to know, my experience was most likely outdated as well.