-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support for alternative crates.io registries in cargo #4036
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Is there a problem with continuous-integration/appveyor/branch, it does not seem to have started? |
Thanks for the PR! Always exciting to see movement on this. I'm personally a little wary to see this merged, however, before we've got a more complete picture in our heads for what custom registries might look like. I fear that given the discussion on #3917 everyone's got a slightly different perception of what a custom registry will look like. I personally feel like this feature to Cargo, when viewed from its entirety, may be deserving of an RFC in rust-lang/rfcs. I think that enough of the community would haven an opinion and like to give feedback that it's worth going through the process. I'm curious, how would you feel about that? |
Thanks for the update. I will sort out an RFC for this over the next few weeks. |
Ok let me know if you need any help! I'm sure @carols10cents would be up for assisting here as well! |
Yes! I have thoughts and use cases, some of which I wrote up on #3917. I'm totally up for bouncing ideas around, thinking through implications of decisions on various workflows, answering questions, etc. However I can be helpful, please let me know! |
If I can help (code, discussion, review, etc) move this forward please ping me. |
I have now created the RFC and sent in the pull request for review (rust-lang/rfcs#2006) so feel free to review/provide comments. |
Thanks @cswindle! I'm gonna close this for now in favor of that RFC |
Currently, cargo supports crates.io and local registries, but not non-local non-crates.io registries (e.g. https://github.com/my_awesome_fork/crates.io-index) - see #3917. This PR adds support for such registries to cargo.
There are two main changes:
registry
key in thepackages
section ofCargo.toml
. Whencargo publish
ing, cargo verifies that the host being published to matches the specified registry index.registry
specified. Cargo will look in that registry rather than crates.io for the dependencies with that key set.A
Cargo.toml
using these features might look like:We are also planning on pushing changes to the crates.io repo to allow setting up a private registry, but that requires tidying before we do so.