Begin rewriting the book, write some of the earlier chapters#90
Begin rewriting the book, write some of the earlier chapters#90jessebraham merged 7 commits intoesp-rs:feat/overhaulfrom
Conversation
|
Oh, guess I forgot to update the CI workflow as well 😅 |
|
I think the content of the early chapters is missing unless Im missing something |
Hmm yeah that was a messy rebase and guess I wasn't paying attention, will try again 😅 |
d6317cb to
17a553d
Compare
|
Had just forgotten to cherry-pick a commit 😅 |
| Rust should be installed using the official installer, found at <https://rustup.rs/>. The required toolchain and target can be installed by running: | ||
|
|
||
| ```shell | ||
| rustup toolchain install stable --target riscv32imc-unknown-none-elf |
There was a problem hiding this comment.
| rustup toolchain install stable --target riscv32imc-unknown-none-elf | |
| rustup toolchain install stable --target riscv32imc-unknown-none-elf --component rust-src |
There was a problem hiding this comment.
Is this actually required? I don't recall ever using --component when installing on my systems, maybe I'm misremembering though.
There was a problem hiding this comment.
You're right, doesn't seem to be required, it's installed by default:
esp@19d485005ff9:~/sandbox/compon$ rustup toolchain install stable --target riscv32imc-unknown-none-elf
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2025-12-11, rust version 1.92.0 (ded5c06cf 2025-12-08)
info: downloading component 'rust-std' for 'riscv32imc-unknown-none-elf'
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-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 'riscv32imc-unknown-none-elf'
info: installing component 'rust-src'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
28.0 MiB / 28.0 MiB (100 %) 25.8 MiB/s in 1s
info: installing component 'rustc'
74.3 MiB / 74.3 MiB (100 %) 28.0 MiB/s in 2s
info: installing component 'rustfmt'
stable-x86_64-unknown-linux-gnu updated - rustc 1.92.0 (ded5c06cf 2025-12-08) (from rustc 1.86.0 (05f9846f8 2025-03-31))
info: checking for self-update
info: downloading self-update
We also have the component required in the rust-toolchain.toml, so if the user doesn't have it, it will be installed when running cargo build/run, same would apply for the target, but I think its worth having the command explicitly before.
5e60326 to
fd66a64
Compare
fd66a64 to
b0c136b
Compare
|
I updated the book workflow to use a different action to install |
| [the rust book]: https://doc.rust-lang.org/book/ | ||
| [the rust on esp book]: https://esp-rs.github.io/book/ | ||
|
|
||
| ### Toolchain |
There was a problem hiding this comment.
Seems this (and the next) chapter partially duplicates a fraction of what is outlined in "The Book" - wouldn't it be better to link to the book instead?
(and tell they should follow the RISC-V route)
There was a problem hiding this comment.
I agree this is a duplicated of the book, but since its only 2 commands (installing the target and installing espflash) that wont change over time, I think its worth to explicitly have them here to make things easier for the user
MabezDev
left a comment
There was a problem hiding this comment.
Looks good from my perspective!
I'd like to do a self-review of this as well as it's been awhile since I actually wrote this, so draft for now. But ready for review regardless.
As usual, happy to make any changes, so feel free to leave lots of comments 😁