Welcome! Please follow these instructions to set up your programming environment. If you run into trouble, we can help you debug.
For larger programs and your course project, you’ll want to edit and run your code on your laptop, which requires you to install Rust, an IDE, and rust-analyzer. To get started, please follow these instructions:
Install an IDE
An IDE is an application you use to locally edit and run your code. We recommend VSCode, but if you already have one that you like, please check that it’s compatible with rust-analyzer.
<aside> ➡️ Follow these instructions to install Visual Studio Code.
</aside>
Once you install VSCode, remember to turn on autosave (File > Auto Save) or manually save your code periodically.
Install Rust and cargo
If your laptop is running macOS or Linux:
<aside>
➡️ Open up a terminal and run this command:
curl --proto '=https' --tlsv1.2 -sSf <https://sh.rustup.rs> | sh
</aside>
If your laptop is running Windows:
<aside>
➡️ Download and run rustup-init.exe. We can help you if you run into difficulties.
</aside>
Follow the on-screen instructions that appear after you run the initial command.
Once Rust is installed, you can run cargo --version in terminal to check that the installation worked correctly.
cargo?Install rust-analyzer
rust-analyzer is an IDE extension that facilitates coding and debugging in Rust. It’s not mandatory, but it makes your life easier!
<aside> ➡️ To install rust-analyzer for VSCode, click the Install button on the VSCode marketplace, and follow any on-screen instructions after.
</aside>