-
Notifications
You must be signed in to change notification settings - Fork 25
Begin rewriting the book, write some of the earlier chapters #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Begin rewriting the book, write some of the earlier chapters #90
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my perspective!
SergioGasquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks
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 😁