Let’s install all we need.
Rust Tools
-
Install the Rust toolchain following the steps in https://rustup.rs/
- The Rust Toolchain is
rustupplus many componentscargo,rustc, the compiledstdcomponent and so on.
- The Rust Toolchain is
-
Add the compiled
std-component for our target microcontrollerrustup target add riscv32imac-unknown-none-elf -
Add development components:
rustup component add rust-analyzer rust-srcrust-srcis thestd-component’s source code, used byrust-analyzer.
Espressif tools
espflash is used for flashing our ELF binary (our program) into the board.
Install espflash with: cargo install espflash
Build dependencies
-
Debian/Ubuntu.
sudo apt install llvm-dev libclang-dev clang -
MacOS. When using the Homebrew package manager, which we recommend:
brew install llvm
Additional Software
- Editor: Neovim, Zed, VSCode, Helix.
Rust AnalyzerLSP, for code completion, formatting.Even Better TOMLLSP, for editing TOML based configuration files