https://github.com/flutter/flutter/blob/master/examples/plat...
I really hope flutter can provide a guide for FFI though.
I can't find any claim from Flutter team that 100fps video processing is even their goal. So that's a strange metric to measure it by - especially since it's competing against Javascript interpreted code which is far from fast by any metric.
> So far it seems the easiest way to call c++ functions is using ObjC++ or Qt framework.
On mobile? Qt really isn't pleasant or usable on mobile.
C++ is probably not the most productive language to write business logic but on the bright side Qt Company recently started supporting Qt for python (Pyside2) - sadly not on mobile devices for now. However it seems you can use PyQT5 on mobiles nowadays. This would be the best of all worlds IMO: 3 highly popular languages with rich libraries, tools and ecosystem -> C++ for speed critical code, Javascript/QML for UI and layout, Python for business logic and as a glue.
Qt also gives me more confidence that is not going away anytime soon. It survived many years and acquisitions (Trolltech, Nokia, Digia) and have some big clients/users in automobile and open source (KDE).
I will closely follow Flutter thought as well as React Native. The latter one also it seems noticed what a pain is writing all those bridges and looks like they are working on it to fix it with new architecture.
https://github.com/qmlnet/qmlnet
note: I'm the author.
Yum install qt5-
Note that Qt is GPL3 nowadays so you can't really ship embedded devices with Qt without paying.
They are pretty cheap considering the typical prices on their target markets, embedded tooling, medical devices, enterprise solutions.
Naturally they decided to pivot to those markets, as Trolltech has hardly seen any significant monetary profit from FOSS.
So it is only fair that those that don't want to pay, also ship code free to the others.
Then Nokia bought it and made it LGPL because they were planning on using it as the foundation for (some of) their mobile phones. Unfortunately, they couldn't decide which phones and went on a downwards slide.
Then Microsoft bought most of Nokia, and Qt got spun off into an enterprise thingy that takes their sales tactics from Oracle. Yes, I know the LGPL allows me to link dynamically for free, no, I don't trust Digia not to sue me for that.
Their pricing is also out of reach of anyone who's not in an industry that charges an arm and a leg due to regulation or niche.
I will use a free UI toolkit when I can. Qt will kill itself with their current pricing model.
Automotive is moving towards Android. Qt is not good for medical either because it is not really certifiable.
The trend is already visible with SaaS, Cloud, IoT,...
Qt is certainly certified for medical use, https://www.qt.io/qt-in-medical/.
I have hardly seen any big Android Auto adoption.
The biggest foe of Qt in Automotive is Web stack.
I have seen two very big Qt projects being cancelled due to Android. Not the Android Auto app but native Android for IVI.
I don't see any indication of your vision for shareware. The trend is towards more and more software being licensed under licenses such as MIT.
Which is exactly my point.
Give the tip of the iceberg for free, charge for everything else and give as little back to upstream, if anything.
You can use it, but is it easy to use and build and deploy?
Can't confirm. We've been using QML (part of Qt) and C++ to write cross-platforms applications (Android, Windows, Mac) for many years now without any major hiccups.
What's wrong with it?
That being said - my personal usecase would like a direct C++ interop, and flutter is working on it. See https://github.com/flutter/flutter/issues/7053
Since flutter runs as native ARM they can directly call C++ instead of having an expensive JNI bridge on android. If you're wanting something fast with native processing - flutter will be the best option out there IMO if that issue is resolved.
Dart C/C++ interop hasn't been a super-bright spot so far, and I am _beyond_ glad to see it's about to change.
The rest is UI and application boilerplate
I did some research and found that Dropbox open sourced their internal tool for building cross-platform mobile apps in C++. Djinni (https://github.com/dropbox/djinni) uses an interface definition language to generate bindings between C++ & ObjC & Java (via JNI). From this, I added some tooling to help get the build setup and define some basic UI elements while trying to keep it simple. If you happen to give it a try, I'd love to hear your thoughts: https://github.com/adamtait/ctheworld
e.g. iOS HID requires navigation buttons for obvious reasons & not so for android.
Use the right tool for the job. Always.
If Flutter can't handle it, it's not the right tool for the job.
Which is sad because I would really want to have some fast and easy access to useful c++ libraries without wasting lots of time writing and maintaining tons of bindings for Java, ObjC, C.
We are on the verge of VR and AR and I don't see how flutter can help e.g. processing >100fps Video Feed using OpenCV library. The demo they presented on stage with ML and smile detection had quite big latency. I wouldn't call it real time.
So far it seems the easiest way to call c++ functions is using ObjC++ or Qt framework.