Prerequisites
Before you start building a web server service with Axum, you need to have Rust installed on your system.
It's advised to use the latest stable version of Rust for this workshop.
Installation guide​
macOS, Linux, or another Unix-like OS.​
- Open a terminal
- Run the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Follow the prompts to complete the installation.
- Restart your terminal after installation.
Windows​
- Website: https://www.rust-lang.org/
- Steps:
- Go to the Rust website.
- Click the "Get Started" button.
- Click the "Other Installation Methods" hyperlink
- Click on
rustup-init.exe
to get the installer. - Run the installer and follow the prompts.
- When prompted, choose "Proceed with installation".
- Restart your computer after installation.
Verify Installation​
After installing the prerequisites, verify your setup by running the following commands in your terminal:
rustc --version
cargo --version
Troubleshooting​
1. Rust/Cargo Errors​
- Update Rust:
rustup update
- Visit https://www.rust-lang.org/ and reinstall Rust if needed.