70 %

Learning Rustlang

Coming from other languages, what should the path laid out be for people new to Rust? This list assumes you're coming from a language like JavaScript.

This list is the list for language constructs and the std library. There are other paths for building cli tools, serverless functions, or wasm.

Intro to Rust

  1. What is Rust useful for and why the fuck should I learn it?
  2. Installing Rust with Rustup
  3. Hello World! Rust is a statically typed, compiled language with high-level tools (println! macro)
  4. Mutable and Immutable variable declaration with let, type inference, and snake_case.

Data Types

  1. Primitive types: (booleans, strings, and characters)
  2. Overview of numbers: integers, floats, and i/usizes. integer literals.
  3. Compound types: tuples and structs

Functions

  1. functions, arguments, and return values
  2. Expressions vs statements
  3. Unit type and unit value
  4. Block expressions

Comments

  • // comments
  • doc comments
  • Markdown

Control Flow

  1. if and else expressions
  2. if-let
  3. loop, while, break, and for
  4. if-let and while-let

?

Iterators

Ownership

  1. Slices

  2. String vs &str

  3. Copy, Drop, Clone

  4. Using 3rd party packages