Introduction to Rust Tutorial

In this introductory lesson we learn what Rust is, the benefits of using Rust, the learning difficulty and prerequisites before starting this course.

If you're new to Rust, or programming in general, start from the beginning.

What is Rust

Rust is a system level programming language, developed by Graydon Hoare at Mozilla as a personal project in 2006. Mozilla later acquired Rust in 2009.

System programming languages are used to build both software, and software platforms. Examples of system level programming languages include C and C++, and are often used to build compilers, game engines and even operating systems.

Rust is heavily influenced by a safe dialect of the C language, called Cyclone. It also includes some object-oriented features borrowed from C++ and functional features from languages like Haskell and OCaml.

The result of this is a type of C-like language that supports object-oriented, functional and imperitave programming.

Rust was considered the most-loved programming language in 2016 , 2017 , 2018 and 2019 according to the annual survey on Stack Overflow.

Why learn Rust

Rust was designed to develop reliable, fast applications in a simple and elegant way.

  1. Rust is ideal for embedded systems because of its low overhead, appropriate for extremely low resource environments.
  2. Rust can build powerful wep apps. It can be compiled into WebAssembly, which runs in major web browsers at near-native speed. This makes it a powerful competitor to Javascript.
  3. Because Rust makes it harder to write code that leaks resources and its minimal footprint, it’s an ideal language for networked services. The aforementioned aspects help lower server costs and operational burdens.
  4. Rust doesn’t have a Garbage Collector, improving performance in any application developed with it.
  5. Rust provides support for concurrency and threads, better error handling, safety checks for cleaner code, reusable code via modules, and many more.

Is Rust hard to learn

Rust is somewhat hard to learn, if you’re new to programming in general.

If you have some experience in higher level object-oriented languages like Python or Java, Rust shouldn’t be more than moderately difficult.

Rust is a low-level programming language, much like C and C++. As such, it requires at least some knowledge of the workings of the machine.

That said, where C is easier to learn but harder to use, Rust is the opposite. It reduces the assumptions and assertions we need to make about the program and its surroundings.

Prerequisites

Before we proceed, please note that we make the following assumptions:

  • You know how to install software on whichever operating system you use.
  • You can create and navigate directories and files on your computer.

This tutorial course is for beginners with no knowledge of Rust, or programming in general. But programmers coming from other languages that want to learn Rust will also find it very helpful.

This tutorial course covers many topics of programming in Rust, ranging from beginner concepts to advanced.