8 ms·
> It would be great to have an offline way to search Rust documentation and examples, >> It all works offline. These docs are pre-installed for you when you in
by gphilip 10y ago
> It would be great to have an offline way to search Rust documentation and examples,
>> It all works offline. These docs are pre-installed for you when you install Rust, and 'cargo doc' will generate them for your whole project.
Not by default, anymore[0], as I found out when I wanted to read the book offline.
To set up offline documentation, do:
rustup component add rust-docs # One-time thing
Now to open the docs in a browser, do one of:
rustup doc
rustup doc --api
rustup doc --book
The second and third forms open up the API documentation and the book, respectively. Bookmark for one-click access.
[0] https://users.rust-lang.org/t/psa-rust-documentation-is-now-optional-and-opt-in-when-installing-via-rustup/8072 https://users.rust-lang.org/t/psa-rust-documentation-is-now-...
- steveklabnik 10y agoGah, I always forget. I want that switched back.