Skip to content
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

Compiling without updating registry #4783

Closed
Paxa opened this issue Dec 6, 2017 · 3 comments
Closed

Compiling without updating registry #4783

Paxa opened this issue Dec 6, 2017 · 3 comments

Comments

@Paxa
Copy link

Paxa commented Dec 6, 2017

Updating registry takes some time when run first time, so building with docker or in CI makes it harder

Is it possible to download compile dependencies and compile project by using only Cargo.lock, without downloading github.com/rust-lang/crates.io-index?

I think Cargo.lock has all necessary information

@alexcrichton
Copy link
Member

Thanks for the report! You can pre-vendor dependencies with cargo vendor and source replacement which I think should do the trick!

@Paxa
Copy link
Author

Paxa commented Dec 6, 2017

As I understand it just copy all dependencies to local folder, could help with building with docker locally, but to make it work in CI, should I put all dependencies in git?

Or is there a way to reconstruct vendor folder from Cargo.lock file?

@alexcrichton
Copy link
Member

Oh sure yeah what you can do is run cargo vendor just before you run Docker so effectively what happens is that when CI starts you'll assemble all dependencies into a format and them ship them over to Docker which then internally uses them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants