What needs to be done to get DynamicLibrary stabilized, i.e. get rid of the std_misc feature gate in DynamicLibrary? If I knew what exactly is unstable about that module, I*d try to get my hands on it.
I suspect that the current DynamicLibrary can live entirely as an external crate on crates.io (i.e. even just taking the current module in std and copying it into a separate cargo crate, with the appropriate license). It is very “dumb”: just calling into the C APIs for dynamically loading code. I believe the reason for instability is basically that it is non-essential for 1.0, and no focused design work has gone into it. The functionality is wildly
unsafe and error-prone, and the API doesn’t help the programmer avoid the pitfalls much at all.
If we were going to have dynamic code loading in std, I would be really interested in having something that could load Rust libraries as safely as possible (building on top of the raw unsafe APIs), but for now I think the raw C-style loading works perfectly well outside
Then I’ll do that and try to improve the crate with maybe some more safe abstractions.
Great! Good luck with your experiments.