Is it possible to compile dart to native Android and iOS without using flutter dependency.
Currently I can create Flutter Module and compile it to an aar or ios framework. But this also bundles some Flutter dependency.
Can it be done with pure dart like how kotlin native does it.
Use Case:
The same AOT compiler that flutter uses is also available as a standalone tool, which can compile non-Flutter apps. Though to run such an AOT compiled application, one needs a runtime system (containing garbage collector, runtime type system, ...). We do have a command line AOT runtime (Dart SDKs ship with dart2native and dartaotruntime).
Though right now we don't provide a custom, non-flutter embedder that can be loaded dynamically into Android/iOS apps (i.e. the analogue of libflutter.so). Though it would be possible to build such an embedder using the Dart VM's embedder API.
We don't have plans atm to provide it, maybe that will change in the Future.
/cc @mit-mit @mraleph @a-siva
Hi @mkustermann
Thanks for the information.
Hope to see this feature implemented sometime in future :)
As @mkustermann notes, there is nothing stopping someone else from doing this via the same mechanisms Flutter uses. :-)
Given that this is not planned for short term, I am just going to close this issue.