I would love to add another thing to opt in, that is sources :), I mean for racer and (maybe for others?) you need to have the source code, but for example I have not updated the source sisnce some time now, even that I have done some rustup update
so it will be nice if also this is included in some way easely identifiable by racer and maybe other programs when running rustup update
.
I think that any program which needs sources can execute rustup component add
. For example, IntelliJ-Rust does this and it works great. The situation with docs is different: the need for them can arise suddenly when the internet is down.
Here is what I get when I run rustup
on an account that has never seen it before:
# curl https://sh.rustup.rs -sSf | sh
info: downloading installer
Welcome to Rust!
This will download and install the official compiler for the Rust programming
language, and its package manager, Cargo.
It will add the cargo, rustc, rustup and other commands to Cargo's bin
directory, located at:
/root/.cargo/bin
This path will then be added to your PATH environment variable by modifying the
profile file located at:
/root/.profile
You can uninstall at any time with rustup self uninstall and these changes will
be reverted.
Current installation options:
default host triple: x86_64-unknown-linux-gnu
default toolchain: stable
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
If 'include offline documentation' and 'include rust source code for IDEs' were listed as optional variables you can tweak (with whatever defaults), then people would be less likely to be surprised by them.
(yeah, I piped random crud from the web to root's account. It was a temp container.)
We use Rustup to build Rust programs inside Docker images, and we definitely do not want documentation to be saved into the image. At the very least, there should be a flag to disable download of the documentation during initial install.
New rust user here. I ran curl ... | sh
. Followed the instructions. Then ran rustup --help
to check out what this new command does. I'm greeted with the rustup options and this bit of text.
rustup installs The Rust Programming Language from the official
release channels, enabling you to easily switch between stable, beta,
and nightly compilers and keep them updated. It makes cross-compiling
simpler with binary builds of the standard library for common platforms.
If you are new to Rust consider running
rustup doc --book
to learn Rust.
So guess what command try next? I'm then greeted with a nice error message from firefox telling me some random path doesn't exist.
It's not a great introduction to new users.
ps: As a suggestion, I think rustup should check if the rust-docs component is installed before trying to have my browser open it, and if it's not installed then tell the user the appropriate command to install it. (e.g. I got the command from the top of this thread, via google. I took a quick look at rustup --help
but didn't see an obvious install
command, and as I'm new to rust and it's lingo I didn't realise you consider the documentation to be part of a toolchain's components.)
Great suggestion! Can you file a bug if there is not already one?