I write a Flutter app (>100kloc), and need to embed some computer vision algorithms for it. Originally, I use C++, and use the OpenCV library to develop my algorithms. Then I use dart:ffi to allow Flutter code to call my C++ code.
It works quite well, but now I need to develop much more complex algorithms, and I am worried because C++ is known to be dangerous unless you are extremely well-trained. So I want to move to Rust. I have learnt Rust and used it for several toy projects and love its safety very much. I also see some tutorials about how Rust talks with Flutter (e.g. this one).
However, I am quite not sure whether I should do it. Rust is very young. I know it is already used in production environments in laptops and servers; but I am not sure whether it is mature enough to be used in mobile platforms (Android and iOS). For example, will I meet tooling problems? Will the performance be bad because it does not have very excellent compiler optimizations? Will I have trouble when I really write down >10kloc of Rust and see an edge case, but at that time I have no way to go back?
Any suggestions and discussions are appreciated!
Related: Anyone called Rust via FFI from Flutter? but half a year has passed and Flutter and Rust has changed a lot