Skip to content

How rust get rand crate in building? #858

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

Closed
BaoshanPang opened this issue Aug 7, 2019 · 2 comments
Closed

How rust get rand crate in building? #858

BaoshanPang opened this issue Aug 7, 2019 · 2 comments

Comments

@BaoshanPang
Copy link

In building rust, I see there are two version of rand have been downloaded into my CARGO_HOME directory, one is 0.6.1, one is 0.7.0. I aslo see the layout of the souce code is quite differnt than what we can see here.

So my quesiton is how/where rust fetch the rand crate source code? In other word, if I want to add something to rand and build it with rust, how should I setup my work environment so the rust could use my local rand copy?

Thanks,
Baoshan

@vks
Copy link
Collaborator

vks commented Aug 8, 2019

Cargo fetches your dependency depending on what is specified in Cargo.toml. You can specify a path dependency with Cargo to use a local copy of Rand. Does this work for you?

@dhardy
Copy link
Member

dhardy commented Aug 8, 2019

Manually downloading crates.io archives is not as easy as might be desired, but is possible.

Alternatively you can clone this repository. The current master is not that different than 0.7.0; there are also git tags for each release.

@dhardy dhardy closed this as completed Aug 9, 2019
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

3 participants