Setting Up Your Workshop
Before a builder can build, they need a workshop full of tools. To write Rust, we set up our own coding workshop on a computer. Letβs get it ready! π οΈ
Meet rustup, the friendly installer
Thereβs a special helper called rustup that sets up Rust for you. You get it from a website called rustup.rs. Open that website in a browser and follow the clear steps it shows you.
Talking to the computer in the Terminal
To use our new tools, we type little messages in a window called the Terminal. The Terminal is a plain text window where you talk to the computer by typing commands and pressing Enter.
Did it work? Letβs check!
After rustup finishes, type this command into the Terminal to see which version of Rust you have:
rustc --version
If everything worked, the computer will print something like this back to you:
rustc 1.79.0 (your numbers may be different)
If you see a version number, hooray β your workshop is open for business! π If you see an error instead, donβt worry. Close the Terminal, open a fresh one, and try the command again.
rustc --version, then press
Enter. Take a look at the version number that comes back!
--version are important!
Quick quiz
What does the command rustc --version show you?
Yes! It checks Rust and prints the version number β proof that your workshop is ready.
rustc --version checks that it worked.
Next up: writing your very first program! π