Skip to content

Commit be54b05

Browse files
kiarie404SergioGasquez
andauthoredDec 21, 2023
additional explanations (#133)
* Added reasons for downloading rust-src and link to a chapter on custom-targets * Update src/installation/riscv.md committed the suggestion made by @SergioGasquez Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com> --------- Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
1 parent bbbe5ed commit be54b05

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎src/installation/riscv.md

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ To build Rust applications for the Espressif chips based on `RISC-V` architectur
77
```shell
88
rustup toolchain install nightly --component rust-src
99
```
10+
11+
The above command downloads the rust source code. `rust-src` contains things like the std-lib, core-lib and build-config files.
12+
Downloading the `rust-src` is important because of two reasons :
13+
- **Determinism** - You get the chance to inspect the internals of the core and std library. If you are building software that needs to be determinate, you may need to inspect the libraries that you are using.
14+
- **Building custom targets** - The `rustc` uses the `rust-src` to create the components of a new custom-target. If you are targeting a triple-target that is not yet supported by rust, it becomes essential to download the `rust-src`.
15+
16+
For more info on custom targets, read this [Chapter][embedonomicon-creating-a-custom-target] from the [Embedonomicon][embedonomicon-official-book].
17+
1018
2. Set the target:
1119
- For `no_std` (bare-metal) applications, run:
1220

@@ -40,3 +48,5 @@ Now you should be able to build and run projects on Espressif's `RISC-V` chips.
4048
[cargo-book-unstable-features]: https://doc.rust-lang.org/cargo/reference/unstable.html
4149
[rust-esp-book-write-app-generate-project]: ../writing-your-own-application/generate-project/index.md
4250
[rust-esp-book-std-requirements]: ./std-requirements.md
51+
[embedonomicon-creating-a-custom-target]: https://docs.rust-embedded.org/embedonomicon/custom-target.html
52+
[embedonomicon-official-book]: https://docs.rust-embedded.org/embedonomicon/

0 commit comments

Comments
 (0)
Please sign in to comment.