Getting Started with Rust

2019-05-12

Programmers should never be chained to one programming language or framework — evolution is the way.

Programmers should never be chained to one programming language or framework — evolution is the way.

Learning site 🐂

What Is Rust Good For, and Where Is It Used?

  1. Rust's low overhead makes it a great fit for embedded programming
  2. Rust can build powerful web applications
  3. Rust is well suited for building distributed online services
  4. Rust is great for creating powerful cross-platform command-line tools
  5. Rust has modern development tools and better IDE support

And there are plenty more benefits — what's stopping you from learning it?

Installation

Linux and macOS users:

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

source $HOME/.cargo/env

export PATH="$HOME/.cargo/bin:$PATH" ⚠️ If you like, you can download and inspect the script before running it

Update and uninstall:

rustup update // update

rustup self uninstall // uninstall

Compile and run:

rustc --version // check the version

rust *.rs // compile

./main // run

Project management

cargo new PROJECT_NAME // create a new project

cargo build PROJECT_NAME // build the project

cargo build --release // release build

cargo run PROJECT_NAME // run the project

cargo check // check the project: fast