C++ interop

Hi, I was wondering if there is any plan to make wrapping our own C++ libraries into flutter easy.
dart:ffi is a great start, but it doesn’t support C++ api, just C.

To make it usable, we have to wrap all C++ calls into C, and then call them via dart:ffi, which takes a lot of time and its hard to maintain; extend.

Also, FFI doesn’t provide any automation in making glue code between Flutter and underlying FFI code. You have to write it manually. Are there any plans to automate that part?

I was looking at flutter roadmap, but there don’t seem to be any mention of improvements for C++ bindings.

Cheers!

Author: Fantashit

1 thought on “C++ interop

  1. @dcharkes why did you closed this issue? ffigen can handle only plain C not C++ …

    Also I’d like to ask dart devs if they researched what people want? I bet you that most of the people that had to port any application to Android which needed performance, they had to compile their C++ code and use the JNI hell to connect it to the Java world, and I also bet you that they hated that part a lot.

    IMHO if you want dart to succeed, you have to listen to what people want not what you think they want.

    Someone who went trough all the JNI hell will not do it again. If you want dart to be used everywhere, I really think you should give us proper C++ interop, I’m not dreaming for something as easy as Qt <-> QML integration, but at least something like boost.python/pybind11.

Comments are closed.