Lesson 7 — rustup and VS Code setup
Question
Minimum environment to run the Rust stack — rustup (toolchain manager) + VS Code + rust-analyzer extension. The three things "you literally can't write Rust without".
Principle (minimum model)
- rustup. Rust's toolchain manager.
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | shis the one-liner. Putscargo/rustc/rustupon$PATH. - Stable channel. Default. Reth tracks MSRV (Minimum Supported Rust Version);
rustup updatekeeps you current. - VS Code + rust-analyzer extension. rust-analyzer = the official language server. Errors + completion + types + jump-to-definition. Without it, you can't practically write Rust.
- Useful additions.
Even Better TOML(forCargo.toml),CodeLLDB(debugger),Error Lens(inline error display). - Verify it works.
cargo new hello && cd hello && cargo run→ printsHello, world!.
Worked example + steps
rustup and VS Code setup
Surprisingly, the Rust dev environment is just rustup + a VS Code extension.
1. Install Rust via rustup
# macOS / Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Verify
rustc --version
cargo --version
cargo is Rust's package manager and build tool. Despite the name suggesting "package manager," you'll actually use it for building, testing, and running too — every day.
2. Add rust-analyzer to VS Code
Search the extensions marketplace for rust-analyzer and install it. Without this, Rust development is essentially impossible:
- Real-time type errors
- Autocomplete and "go to definition"
- Inline type hints over variables
Tip: rust-analyzer only activates when the open folder contains a
Cargo.toml. We'll create one in the next step.
3. Your first project
cargo new hello_reth
cd hello_reth
cargo run
If you see "Hello, world!", you're ready.
4. Need to test something quickly?
Use Rust Playground. It runs real Rust in the browser — no install needed.
Next, a fast tour of the Rust syntax you'll see throughout the course — then your first challenge.
Summary (3 lines)
- Three essentials: rustup + VS Code + rust-analyzer extension.
curlone-liner installs rustup;cargo new helloverifies. - Useful additions:
Even Better TOML+CodeLLDB+Error Lens.rustup updatekeeps stable current. - Environment ready. Next lesson: Rust quick reference — the syntax you'll see in the Reth / Revm / Alloy source.