Most editors/IDEs have good Rust support at this point, but I recommend Visual Code with Rust Analyzer.
Simply copy and paste the command from the rustup website (here) in a terminal. Rustup will install the rustc compiler and, just as importantly, the cargo package manager.
You should add the clippy extension to rust with
rustup component add clippy
Clippy gives important hints (and tips and warnings) to improve code quality.
To test the installation, you can create a simple package and build/test it with the commands:
cargo new --lib x
cd x
cargo build
cargo test
Because Windows is weird and makes everything difficult to install, it's much easier to just install the Windows Subsystem for Linux 2 (which is awesome) and follow the instructions for Linux/OSX.
- Instructions to install WSL2 (WSL1 is a bit limited): https://docs.microsoft.com/en-us/windows/wsl/install-win10
- A good terminal for WSL2: https://www.microsoft.com/en-ca/p/windows-terminal/9n0dx20hk701?rtc=1&activetab=pivot:overviewtab
You can then install Visual Code on Windows and use with this extension to launch visual code on the WSL2.