Skip to content

Making docs optional again #998

Description

@MJDSys

See as docs are required again due to #903, can we track what's necessary to make them optional again here? As one of my laptops doesn't have space for the docs (16G disk :( ), I'd be interested in helping fix the relevant issues. The two mentioned issues I've seen are:

Are there any others? And if you prefer to track this information elsewhere, please close this bug and point me in the right direction!

Activity

  1. vks commented on Mar 22, 2017

    @vks

    Another problem are network file systems. For me it takes minutes to install the docs, the rest finishes almost instantly.

  2. pravic commented on Mar 22, 2017

    @pravic

    I'd prefer to leave docs as optional since I use the online version only and don't want to waste disk space or increase rustup update time.

  3. brson commented on Mar 23, 2017

    @brson
    Contributor

    The major missing feature is that the manifest format needs to be extended to understand optional features: #1006.

  4. Boscop commented on Jun 26, 2017

    @Boscop

    Yes, please make docs optional again! We work a lot with Raspberry Pis where space is very limited!

  5. wagenet commented on Sep 13, 2018

    @wagenet

    This would certainly be nice for CI.

  6. Boscop commented on Sep 14, 2018

    @Boscop

    And when updating a nightly or when different projects use different nightlies (with a rust-toolchain file) it always takes a long time to install/update them, it would be much faster without the docs.

  7. pravic commented on Sep 14, 2018

    @pravic

    The major missing feature is that the manifest format needs to be extended to understand optional features

    Is it still? Because now we have plenty of optional components in rustup (rust-std-*, rust-src, clippy-preview, etc).

    The problem is (among others) that $toolchain/share/doc contains nearly 15000 files which is a big pressure on disk during toolchain updates - on Windows it takes a really significant amount of time to install rust-docs.

    From #903:

    It seems that most people are comforted knowing docs are available by default, so I want to turn them back on, then add some more options to remove them.

    I am fine with default (though I really doubt that those who really need docs can't install them as a component), but let's make them as opt-out, so rustup would remember during the next update that rust-docs doesn't need to be downloaded.

  8. Boscop commented on Sep 14, 2018

    @Boscop

    I can confirm that it takes a long time to install the docs on windows, and I'm dealing with multiple nightlies for different projects (with rust-toolchain files)..

    But I'd prefer if the docs were opt-in, because most people only use the online docs. An internet connection is required to be able to use Rust anyway..

  9. Arnavion commented on Sep 14, 2018

    @Arnavion

    The major missing feature is that the manifest format needs to be extended to understand optional features

    Is it still? Because now we have plenty of optional components in rustup (rust-std-*, rust-src, clippy-preview, etc).

    @pravic The issue is that the manifest does not have a way express opt-out components, only opt-in.

  10. shepmaster commented on Sep 14, 2018

    @shepmaster
    Member

    The playground docker images are also about 300MB larger than they need to be because of the docs (which I'm working on removing at the moment).

  11. Geobert commented on Sep 19, 2018

    @Geobert

    Installation of docs makes rustup hang at the end of the install process: #1464

  12. pronebird commented on Oct 24, 2018

    @pronebird

    It takes ages for us to install Rust on Travis/Windows. Any progress on sorting this out? Really delays builds by 10 minutes or more which is impossible to work in productive way without wasting 2 hours on CI each day.

  13. nrc commented on Oct 24, 2018

    @nrc
    Member

    I have a plan for profiles which will address this. I hope to implement in the next few weeks

  14. johnthagen commented on Dec 9, 2018

    @johnthagen
    Contributor

    @nrc I'm sure this is nothing new to you, but wanted to provide another data point. Building a "Hello World" executable on Travis CI takes 8x longer on Windows. The vast majority of the time is spent installing rust-docs.

    https://travis-ci.org/johnthagen/min-sized-rust/builds/465623377

    travis-win

    The profile work will have a great impact on CI. ❤️

  15. Kampfkarren commented on Dec 27, 2018

    @Kampfkarren

    @nrc What's the status on that? rust-docs takes minutes to install when I never use them.

  16. 43 remaining items

  17. softprops commented on May 4, 2019

    @softprops

    Is there a place where I can read up on profiles. I've only found this open pull without a description #1673

  18. kinnison commented on May 7, 2019

    @kinnison
    Contributor

    Currently there's not anything concrete to read about, sorry, no.

  19. ashthespy commented on May 7, 2019

    @ashthespy

    @softprops
    Maybe this gives you a starting point?

    let profiles = &[
                    ("minimal", vec!["rustc", "cargo", "rust-std"]),
                    ("default", vec!["rustc", "cargo", "rust-std", "rust-docs"]),
                    (
                        "complete",
                        vec!["rustc", "cargo", "rust-std", "rust-docs", "rust-src"],
                    ),
                ];
  20. nrc commented on May 22, 2019

    @nrc
    Member

    Is there a place where I can read up on profiles. I've only found this open pull without a description

    You can see the initial design discussion at https://internals.rust-lang.org/t/pre-rfc-improve-access-to-rustup-components/8318

  21. softprops commented on May 22, 2019

    @softprops

    Thanks @ashthespy. I'll follow this issue's progress.

    For context I'm interested in slimming down the docker builder image for aws lambda softprops/lambda-rust#1. I really just need to cargo build tool chain. The bundled docs artifacts aren't useful in this context and yet they aren't currently possible to opt out of. This minimal profile looks great!

  22. shepmaster commented on Oct 15, 2019

    @shepmaster
    Member

    @kinnison is this issue addressed by the minimal profile now?

  23. shepmaster commented on Oct 15, 2019

    @shepmaster
    Member

    This appears to do what I want and not include the docs!

    curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain "${channel}"
    
    info: downloading installer
    info: profile set to 'minimal'
    info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
    info: latest update on 2019-09-26, rust version 1.38.0 (625451e37 2019-09-23)
    info: downloading component 'cargo'
    info: downloading component 'rust-std'
    info: downloading component 'rustc'
    info: installing component 'cargo'
    info: installing component 'rust-std'
    info: installing component 'rustc'
    

    ❤️

  24. vks commented on Oct 15, 2019

    @vks

    It is also possible again to remove the rust-docs component (independently of the chosen profile).

  25. shepmaster commented on Oct 15, 2019

    @shepmaster
    Member

    @vks yup, I was very happy to do

    for tc in 1.0.0 1.2.0 1.4.0 1.5.0 1.12.1 1.14.0 1.15.1 1.16.0 1.17.0 1.18.0 1.19.0 1.20.0 1.21.0 1.22.1 1.23.0 1.24.1 1.25.0 1.26.2 1.27.2 1.28.0 1.29.2 1.30.1 1.31.0 1.31.1 1.32.0 1.34.0 1.35.0; do
        rustup component remove --toolchain $tc rust-docs
    done
    

    Note that this doesn't work for very old releases (like 1.0.0), which predate the concept of components. However, I'll take the savings for the versions which do!

  26. kinnison commented on Oct 15, 2019

    @kinnison
    Contributor

    I believe this is now covered so I'm going to close the issue. Thanks all for your patience.

  27. leodotcloud commented on May 10, 2022

    @leodotcloud

    Leaving a trail for those who are looking to do this with the offline installer:

    export RUST_VERSION=1.60.0 && \
        export TMP_RUST_DIR=/tmp/rust && \
        mkdir -p "${TMP_RUST_DIR}" && \
        cd "${TMP_RUST_DIR}" && \
        curl -sLf "https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz" |  \
          tar xvzf - -C "${TMP_RUST_DIR}" --strip-components=1 --exclude=rust-docs && \
        ./install.sh --without=rust-docs && \
        cd /tmp && rm -rf "${TMP_RUST_DIR}"
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions