Open
Description
dart compile exe
enables compiling Dart source code to a standalone executable.
It would be nice if we could link in static libraries in this process so that we can use DynamicLibrary.executable()
to look up the symbols.
Current workaround: Use shared libraries, use DynamicLibrary.open()
with a relative path, and ship a folder with the dart compile exe
executable and the shared libraries (*.so
/ *.dll
/ *.dylib
).
Technical work that needs to happen for this:
- Make
dart compile exe
use a proper format instead of appending the precompiled programing as a blob to the dart precompiled runtime by using a a proper linker on each target platform. - Add options to pass in linker arguments.
- [vm/ffi] Add support for weak symbols
@Native(weak: true)
#60038
(cc @mkustermann, @cskau-g I don't think we had an issue tracking this yet.)