-
Notifications
You must be signed in to change notification settings - Fork 47
Use Dart VM FFI #12
Comments
Hello @kozw - is there any work being done on this now that |
Not at the moment no, indeed due to limited time and resources. I'm not sure the current ffi branch even compiles with the latest preview bits. Feel free to start creating pull requests. |
@kozw Maybe you could team up with Marvin Hannot? (https://gitlab.com/MagicGuitar/dart-sodium) |
As far as I know, the FII doesn't work (yet) with AOT compilation. And calls aren't asynchronous like calls to Flutter's |
FFI does now work with AOT. See dart-lang/sdk#35765 and dart-lang/sdk#37295. |
@cbenhagen is there any documentation on usage ? |
Porting flutter_sodium to FFI has recently been started. Track its progress in #35. Closing this issue |
The Flutter 2019 roadmap lists better support for C/C++ libraries from Flutter, including direct calls to C/C++ from Dart. This is of major importance for flutter_sodium. The current implementation uses platform channels with Java and Swift interop.
Not only is the runtime performance sub-optimal, there's a lot of code to write and maintain. Not to mention the fact that the Android version is still lacking in features compared to iOS due to a dependency on incomplete 3rd party libraries (#7)
As soon as native C interop is available, flutter_sodium should take advantage of it. You can track the Dart issue and read more in the FFI vision document. Looks like an initial version is planned somewhere in Q1 2019.
The text was updated successfully, but these errors were encountered: