dart:ffi Platform agnostic way to specify native library name for DynamicLibrary.open() #39212
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
library-ffi
Current dart:ffi (I tried with 2.5.2 on linux_x64) simply requires file path at
DynamicLibrary.open()
. It is good that at least a method has an obvious behavior that does not expect any implicit paths to probe, but this is too barebone for real-world use. What I would expect this function is like, this piece of code works in platform agnostic way:Also, there should be some standard probed paths to look up the library file, with file extensions supplied (
.dll
/.dylib
/.so
) and therefore something likeDynamicLibrary.open('c')
should work.We have no such problem in Java JNI or .NET P/Invoke.
The text was updated successfully, but these errors were encountered: