Closed virtualzeta closed 1 year ago
This is a decision for the Flutter team whether to expose those functions yes or no. (I would expect no, as there are probably a bunch of invariants kept consistent between the Dart and C code. And also the dart_api.h
which is a public C API in Dart is hidden in Flutter.)
I can't transfer this issue to the flutter/fluter repo from here, please open an issue there.
Is there a way for a normal developer of the framework (not engine or otherwise) to have the symbols of the native functions of namespace
PlatformConfigurationNativeApi
(defined inFFI_FUNCTION_LIST
) to invokate and use them in the app code?Like for example
PlatformConfigurationNativeApi::GetRootIsolateToken
to be declared/invoked with the lookup method on the correct library or with:roughly as is done in the
dart:ui
library.I randomly checked if the symbols are present in the global ones with
DynamicLibrary.process().providesSymbol("PlatformConfigurationNativeApi::GetRootIsolateToken")
or in thelibflutter.so
library after loading it withDynamicLibrary.open
(which anyway I think is useless because all those symbols should already be loaded globally) but they are not there.I also take the opportunity to ask if a
DynamicLibrary
method is available or planned to be implemented to get the list of symbols present in the library concerned rather than having to perform a specific check on the symbol to see if it exists.Thank you.