Skip to content

Load a library with flags #126

@charlyisidore

Description

@charlyisidore

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions