avr-rust / book.avr-rust.com

The AVR-Rust guidebook
https://book.avr-rust.com/
Other
75 stars 19 forks source link

Document the minimum supported Rust version (MSRV) #25

Open dylanmckay opened 4 years ago

dylanmckay commented 4 years ago

The book has strong constraints on the minimum supported Rust nightly version due to the fact that AVR support is new, and certain instructions/steps depend on changes that are in more recent Rust nigthlies but not others.

Document it at the top level of the book somewhere. In general, it will be bumped to the latest version of the Rust nightly compiler when first put in place, and then subsequently the version should be updated whenever steps in the book are modified or added which depend on newer features.

stappersg commented 3 years ago

Something along the request this issue is about: Document how to revert rustup override set nightly.

stappersg commented 3 years ago

how to revert rustup override set nightly.

Not important, no reason to fear of damage on the development system. Have a look at this:

$ rustup | grep override
    <+toolchain>    release channel (e.g. +stable) or custom toolchain to set override
    override       Modify directory toolchain overrides

and this

stappers@trancilo:~/src/rust/RustAVR
$ cd blink/
stappers@trancilo:~/src/rust/RustAVR/blink
$ rustup override set nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-01-16, rust version 1.51.0-nightly (bc39d4d9c 2021-01-15)
info: downloading component 'cargo'
  6.0 MiB /   6.0 MiB (100 %)   2.2 MiB/s in  2s ETA:  0s
info: downloading component 'clippy'
  2.4 MiB /   2.4 MiB (100 %)   2.2 MiB/s in  1s ETA:  0s
info: downloading component 'rust-docs'
 14.8 MiB /  14.8 MiB (100 %)   2.2 MiB/s in  6s ETA:  0s
info: downloading component 'rust-std'
 24.8 MiB /  24.8 MiB (100 %)   2.2 MiB/s in 11s ETA:  0s
info: downloading component 'rustc'
 50.5 MiB /  50.5 MiB (100 %)   2.1 MiB/s in 24s ETA:  0s
info: downloading component 'rustfmt'
  3.7 MiB /   3.7 MiB (100 %)   2.2 MiB/s in  1s ETA:  0s
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'clippy'
info: installing component 'rust-docs'
 14.8 MiB /  14.8 MiB (100 %)  13.3 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'
 24.8 MiB /  24.8 MiB (100 %)  15.2 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 50.5 MiB /  50.5 MiB (100 %)  16.9 MiB/s in  2s ETA:  0s
info: installing component 'rustfmt'
info: override toolchain for '/home/stappers/src/rust/RustAVR/blink' set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu installed - rustc 1.51.0-nightly (bc39d4d9c 2021-01-15)

stappers@trancilo:~/src/rust/RustAVR/blink
$ 

Especial the

info: override toolchain for '/home/stappers/src/rust/RustAVR/blink' set to 'nightly-x86_64-unknown-linux-gnu'

To me it seems that the rustup override set nightly happens only within the current directory, so not system wide.

stappersg commented 2 years ago

Note to my future self: Have you found how Cargo.lock can help with a maintenance burden? Idea: Add to book how to reproduce the it did work for us.