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

[Usage problem] How to download the source code of external deps of rust std #2644

Closed
Gnosnay opened this issue Jan 24, 2021 · 1 comment
Closed
Labels
forwarded This issue as been forwarded "upstream" not-rustup Whatever is described in this issue isn't Rustup's fault question

Comments

@Gnosnay
Copy link

Gnosnay commented Jan 24, 2021

Hey there, thanks a lot for reading this issue.
I am one novice of rust. When I learn the rust, I found one problem that I can not navigate into the external deps of rust std code.

what is the problem

for example, I wanna know how Hashmap implemented. So I use Clion to read the source code std lib. And I found the std relies on the external dep called hashbrown, which I couldn't navigate into it to read more:
image

what I found

I found the deps that std relies on are imported in the way called rustlib which are all stored under .rustup:

image

what I wanna know

So, what I wanna know is that is there any way to use rustup to download the source code of rlib or make it possible to read the source code of deps of std lib?

I would appreciate it if anyone can offer the help. Thanks a lot for your reading.

@ehuss
Copy link
Contributor

ehuss commented Jan 24, 2021

The source for dependencies is not available. We attempted to add them to the rust-src component in rust-lang/rust#78790, but it had to be reverted due to some issues it caused. You can follow issue rust-lang/wg-cargo-std-aware#23 for tracking adding it back.

@kinnison kinnison added forwarded This issue as been forwarded "upstream" not-rustup Whatever is described in this issue isn't Rustup's fault question labels Jan 27, 2021
@Gnosnay Gnosnay closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded This issue as been forwarded "upstream" not-rustup Whatever is described in this issue isn't Rustup's fault question
Projects
None yet
Development

No branches or pull requests

3 participants