-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Move dynamic_lib out of std. #16765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move dynamic_lib out of std. #16765
Conversation
Rebased and merged. |
I'm a fan. @alexcrichton @aturon? |
It should probably leave the old module in place, |
Seems like a step in the right direction to me. |
Ah yes indeed! I think that some of this may end up eventually in libnative (at least the raw low-level native bindings), but as its own crate this certainly has room to grow to do things like inspect metadata for type safety, etc. @brson, Sadly I don't think we can use @treeman, could you expand the commit message a little bit more to explain what code is going to break and how it can be updated. You may also want to move some rationale from the issue to the commit message as well. |
`dynamic_lib` has been moved out of `libstd` to it's own crate `libdynamic_lib`. There isn't strong support for keeping it in `libstd`. It is fine for `librustc` to depend on a crate external to `libstd`. This will break `std::dynamic_lib::DynamicLibrary` and `std::dynamic_lib::dl` which are now `dynamic_lib::DynamicLibrary` and `dynamic_lib::dl`. Needs `extern crate dynamic_lib;`. Closes #8157. [breaking-change]
Updated commit message. |
Thanks! |
Interesting. The build system found a cyclic crate dependency between I couldn't get the build system to work around it, if it's even possible.
Any ideas on how to proceed? |
Aha, I thought I remembered some use case in libstd. This is where the bindings for that module don't need the full functionality of |
Closed this PR as we may want to do what @alexcrichton said in the future. |
A first step in fixing #8157.
We might want to move
dynamic_lib
to a crate in rust-lang org, this is a first step towards that. Does it make sense to do it this way?