As of lately, some Linux repositories include rustlang and cargo for developers to download. Yet the preferred method of installing and updating Rust is still rustup. I've seen many quick tutorials online showing how to install rustup and use it to update Rust and Cargo, yet I see there are a few useful functions of rustup that people seldom talk about or hear.
The Rust Book
The thing that helped me get started the fastest in learning Rust was going through the famous Rust Book as slowly as I could stand until I understood the fundamentals of the language. Many people are unaware that the Rust Book is installed onto your computer when you download rustup. You can even bring it up in your browser offline from the terminal by running
rustup doc --book.
Standard Library Documentation
That isn't the only documentation trick that rustup has up its sleeve. You can access just about every useful official Rust documentation that there is. By omitting the --book flag, the documentation page loads with
rustup doc. Here you can find the rustc book, the cargo book, and even extensive documentation on the Standard Library's API.
Not Impressed Yet?
Don't worry. There's a whole lot more for some of you, Rust experts and enthusiasts out there. You can browse:
- The Embedded Rust Book
- The Rustdoc Book
- The Rust Reference
- The Rustonomicon for you daring few
- The Unstable Book
- The Rustc Contribution Guide
- The Rust Compiler Error Index
Even if you are the local expert on Rust, there is plenty here for anyone to read and learn. And the best part is that it's all offline. So if you are going on a long plane ride, trying to get rid of online distractions, or preparing to rebuild society with software after the inevitable EMP disaster, the rustup offline documentation will surely help you reach your goals.