Updating Rust to next version

Is process of updating ok?
Where is installing ?

info: syncing channel updates for 'stable-x86_64
info: latest update on 2022-06-30, rust version 1.62.0 (a8314ef7d 2022-06-27)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
18.2 MiB / 18.2 MiB (100 %) 10.6 MiB/s in 3s ETA: 0s
info: downloading component 'rust-std'
23.7 MiB / 23.7 MiB (100 %) 10.7 MiB/s in 3s ETA: 0s
info: downloading component 'rustc'
54.7 MiB / 54.7 MiB (100 %) 10.0 MiB/s in 7s ETA: 0s
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'rust-src'
2.3 MiB / 2.3 MiB (100 %) 1.1 MiB/s in 11s ETA: 0s
info: installing component 'cargo'

cargo --version
cargo 1.62.0 (a748cf5a3 2022-06-08)
rustc --version
rustc 1.62.0 (a8314ef7d 2022-06-27)

It looks good. Rustup typically installs binaries in .cargo directory in your home directory.

If you run rustup default stable, it will configure your Rust installation to use the latest stable version you have.

2 Likes

The high-level rustup shims are in ~/.cargo, and the actual releases are in ~/.rustup/toolchains/.

2 Likes

The question is interesting indeed. If I understand correctly, there should be also lines like "installing component 'rustc'" (and so on for every downloaded component), not only for 'rust-src' and 'cargo'.

I think that is just the top part of the cut and paste.

Maybe.., but seems not. Always the same picture. I have saved screenshots (1.60, 1.61)
Next time I will use 'rustup update stable >> up.txt' and post here

Assuming you are using bash type shell?

Directing the output to file is a good idea if you wan to save the text. But keep in mind that the ">>" will append to the up.txt file if it already exists.

Also the output of rustup is to both stdout and stderr.
If you do the command as you posted it will only save the stdout stuff and the stderr stuff will still go to your terminal.

You may need to use a more complex redirection.

rustup  update > up.txt 2>&1

to save stderr and stdout to same file or

rustup update > up.txt 2> up.err 

to save stdout and stderr to two separate files.

1 Like

Windows command line (Win11)

rustup update stable 1> up.txt 2>&1

I think will save the stdout and stderr to one file on widows. I have not tested.

1 Like

So, below are the results:

rustc --version
rustc 1.62.0 (a8314ef7d 2022-06-27)

rustup update stable >up.log 2>up.err

rustc --version
rustc 1.63.0 (4b91a6ea7 2022-08-08)
cargo --version
cargo 1.63.0 (fd9c4297c 2022-07-01)

up.log:

stable-x86_64-pc-windows-msvc updated - rustc 1.63.0 (4b91a6ea7 2022-08-08) (from rustc 1.62.0 (a8314ef7d 2022-06-27))

up.err:

info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2022-08-11, rust version 1.63.0 (4b91a6ea7 2022-08-08)
info: downloading component 'rust-std' for 'wasm32-unknown-emscripten'
info: downloading component 'rust-std' for 'asmjs-unknown-emscripten'
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-std' for 'wasm32-unknown-emscripten'
info: removing previous version of component 'rust-std' for 'asmjs-unknown-emscripten'
info: removing previous version of component 'rust-std' for 'wasm32-unknown-unknown'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: removing previous version of component 'rustfmt'
info: installing component 'rust-std' for 'wasm32-unknown-emscripten'
info: installing component 'rust-std' for 'asmjs-unknown-emscripten'
info: installing component 'rust-std' for 'wasm32-unknown-unknown'
info: installing component 'rust-src'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
info: checking for self-updates
info: downloading self-update

Everything is Ok, all installings exist.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.