Skip to content

Conversation

@jessebraham
Copy link
Member

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 😁

@jessebraham
Copy link
Member Author

Oh, guess I forgot to update the CI workflow as well 😅

@SergioGasquez
Copy link
Member

I think the content of the early chapters is missing unless Im missing something

@jessebraham
Copy link
Member Author

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 😅

@jessebraham
Copy link
Member Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rustup toolchain install stable --target riscv32imc-unknown-none-elf
rustup toolchain install stable --target riscv32imc-unknown-none-elf --component rust-src

Copy link
Member Author

@jessebraham jessebraham Jan 16, 2026

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.

Copy link
Member

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.

@jessebraham jessebraham force-pushed the feature/rewrite branch 3 times, most recently from 5e60326 to fd66a64 Compare January 21, 2026 02:52
@jessebraham
Copy link
Member Author

I updated the book workflow to use a different action to install mdbook and mdbook-mermaid, hopefully haven't messed anything up in the process 😅

@jessebraham jessebraham marked this pull request as ready for review January 21, 2026 02:55
[the rust book]: https://doc.rust-lang.org/book/
[the rust on esp book]: https://esp-rs.github.io/book/

### Toolchain
Copy link
Contributor

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)

Copy link
Member

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

Copy link
Member

@MabezDev MabezDev left a 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!

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@jessebraham jessebraham merged commit dfbe235 into esp-rs:feat/overhaul Jan 23, 2026
7 checks passed
@jessebraham jessebraham deleted the feature/rewrite branch January 26, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants