In order to debug std the source code must be present. It's complicated because you really want to use unoptimized builds for debugging, so this might entail some complicated installation scenarios where you have both optimized and unoptimized std.
Also necessary for racer: https://www.reddit.com/r/rust/comments/2sfmtj/racerrustup/
I'm not sure yet the best way to do it. Adding docs to the installer has already drawn consternation for the bloat. I'm interested in pursuing an 'online' installer that only downloads components on demand, which would free us up to package more stuff.
"Adding docs to the installer has already drawn consternation for the bloat" Really?.. Hah, I'm surprised in this day an age people are still picky about that.
Still, surely that mustn't be much of an issue for the standard library sources? I reckon they should be just a couple of few Mbs, properly compressed. I couldn't check it myself since I can't quickly figure out from the Rust sources which ones are standard library, and which are the compiler/rest-of-the-toolchain.
How about providing a separate command line option for the sources?
any progress on this?
cc @nrc
Some comments from IRC
11:22 <&brson> posix4e: there are a few steps to making source easily installable: package and deploy it in rust-installer format, teach the channel metadata about it, teach rustup.sh how to install source
packages
11:22 <&brson> the first is easy to tackle locally. the second requires hacking our infrastructure
11:22 <&brson> to make source packages you've basically got to add to the makefiles rules like https://github.com/rust-lang/rust/blob/master/mk/dist.mk#L143
11:23 <&brson> it'll take the entire source, probably as *already* tarred here https://github.com/rust-lang/rust/blob/master/mk/dist.mk#L36
11:23 <&brson> then invoke rust-installer to turn it into a rustc-source package
11:24 <&brson> (though maybe std-source would be better? hard to pull out just the std source)
11:24 <&brson> once the makefiles know how to create rustc-source they'll automatically start uploading with nightlies
11:25 <&brson> one wrinkle here is that source is target-agnostic and all our existing bins are target-specific, so named e.g. rustc-*-x86_64-etc
11:25 <&brson> we *might* just go ahead and stick with that scheme, producing a bunch of identical source artifacts that are named differently, per target
11:25 <&brson> but that seems wasteful
11:26 <&brson> i think just calling it rustc-source-{version}.tar.gz is probably fine, but we've got to consider the naming of the existing source tarballs (which is not a rust-installer package), and whether it
conflicts
cc @fenduru
I think everyone would be very happy with something very basic even if it is far from perfect - just enough for multirust/other tools to fetch the source and keep racer up to date with nightlies
Since YCM now provides Rust completion support (through the YCM -> ycmd -> racerd -> racer chain), we too would love to see Rust standard library source code installed as part of the Rust installation. The code-completion experience is sub-par when the user hasn't gone through the hassle of downloading Rust source and then setting the correct YCM conf option to tell us where that is. Few users will go read the docs and understand this option needs to be set.
Currently we're adding an error message for this case so that the user has something to go on besides "completion failed," but it's still a shitty user experience. If the stdlib source code could be installed along with rustc & cargo, then Rust code-completion, GoTo etc would Just Work out of the box (for YCM at least).
Where instructions how to download Rust sources?
I want configure RustDT (https://github.com/RustDT/RustDT/blob/latest/documentation/UserGuide.md) but I don't see any instructions here. I use Windows.
@AlexRadch : Go to https://www.rust-lang.org/downloads.html and click on "Source".
Any progress on this?
@RobertWHurst PR #34366 is a requisite for this.
Almost working. We're producing the source packages, but they are busted. Next fix is https://github.com/rust-lang/rust-installer/pull/48
Very cool. Can't wait 馃槂
We've got rustup component add rust-src now, so closing.
Most helpful comment
We've got
rustup component add rust-srcnow, so closing.