Learning Rust
gitbook
gitbook
  • Introduction
  • Basics
    • Why Rust
    • Installation
    • Hello World
    • Cargo,crates and basic project structure
    • Comments and documenting the code
    • Variable bindings, constants and statics
    • Functions
    • Primitive data types
    • Operators
    • Control flows
  • Beyond The Basics
    • Vectors
    • Structs
    • Enums
    • Generics
    • Impls and traits
  • The Tough Part
    • Ownership
    • Borrowing
    • Lifetimes
  • Lets Get It Started
    • Code organization
    • Functions
    • Modules
    • Crates
    • Workspaces
    • use
    • std, primitives and preludes
Powered by GitBook
On this page
  • Rustup
  • For Mac and Linux Users
  • For Windows Users
  1. Basics

Installation

PreviousWhy RustNextHello World

Last updated 7 years ago

Rustup

There are many ways to install Rust on your system. For the moment the official way to install Rust is using .

Rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between stable, beta, and nightly compilers and keep them updated. It makes cross-compiling simpler with binary builds of the standard library for common platforms.

Rustup installs rustc, cargo, rustup and other standard tools to Cargo's bin directory. On Unix it is located at $HOME/.cargo/bin and on Windows at %USERPROFILE%\.cargo\bin. This is the same directory that cargo install will install Rust programs and Cargo plugins.

⭐️ If you are on Microsoft Windows, you have to install Visual C++ Build Tools 2013 or higher. The recommended way is installing Visual C++ 2015 Build Tools which requires additional 3–4 GBs.

For Mac and Linux Users

curl https://sh.rustup.rs -sSf | sh

For Windows Users

Download rustup-init.exe from and run

💡 More information can be found on the .

After installing Rust you can check the current version by typing rustc --version orrustc -V on your terminal to verify the success of the installation.

Rustup
📖
📖
www.rustup.rs
Github page of Rustup project