Minimizing the rust-src component


I’ve noticed that the rust-src component has pretty much the same content as the rustc-$version-src tarball for the compiler distribution, just wrapped in a rust-installer script to install to some rustlib/src path.

My question is, does it really need to contain everything? My impression is that this is mostly meant to aid general Rust development, for racer/rls/etc., so I’d think all you really need are the sources for the standard library - roughly just for the *.rlib parts of rust-std. Maybe you could also justify a rust-internals-src for the compiler’s additional librustc_foo crates. But I really don’t see the need to have stuff like src/llvm and src/test in here!

I’ve been asked to package rust-src in our Fedora RPMs, and I’d like to do this now that stuff like RLS is picking up steam, but I would like to see it a bit more curated if possible.


Actually, now I see this subset of crates is selected for the rust-analysis component already – so I guess the logic does exist to know what should be user-facing.


The only purposes I’m aware of for rust-src are related to std, and I would not expect it to be usable for everything the Rust source is used for during development. It may be reasonable to remove some parts.


Thanks @brson - I’ll take your reply and the “likes” as votes in favor, and see if I can make this happen.


IMHO rust-src component should be minimized for stable, not nightly. For nightly I want e.g. goto definition in libsyntax to work properly with racer or rls.