For our project, we need to load a dynamic library with specific flags (e.g. RTLD_NOW | RTLD_GLOBAL) on unix platforms.
To the best of my knowledge, abi_stable currently does not provide this ability. Is it something you would consider?
The libloading crate used by abi_stable provides a Library::open that accepts flags.
However, the RawLibrary struct that holds the Library struct can only be constructed using the RawLibrary::load_at method which executes the Library::new method without flags.
I am considering implementing a new method (maybe RawLibrary::load_at_with(full_path, flags)) available for unix platforms to allow giving flags. Besides, I would add a lib_header_from_path_with(path, flags) function similar to lib_header_from_path(path).
What would be your preferred approach?
Many thanks
For our project, we need to load a dynamic library with specific flags (e.g.
RTLD_NOW | RTLD_GLOBAL) on unix platforms.To the best of my knowledge,
abi_stablecurrently does not provide this ability. Is it something you would consider?The
libloadingcrate used byabi_stableprovides aLibrary::openthat accepts flags.However, the
RawLibrarystruct that holds theLibrarystruct can only be constructed using theRawLibrary::load_atmethod which executes theLibrary::newmethod without flags.I am considering implementing a new method (maybe
RawLibrary::load_at_with(full_path, flags)) available for unix platforms to allow giving flags. Besides, I would add alib_header_from_path_with(path, flags)function similar tolib_header_from_path(path).What would be your preferred approach?
Many thanks