You Want to Learn Rust but You Don’t Know Where to Start | by Shinichi Okada | Towards Data Science

Table of ContentsIntroduction🦀 Rust Toolchains🦀 Rust Free Online Books and Resources🦀 Rust Official Links🦀 Video Tutorials🦀 Podcast🦀 Interactive Learning🦀 Online Books & Tutorials🦀 Cheat Sheets🦀 Rust Community 🦀 Coding Challenge🦀 Rust IDE Extensions🦀 Rust Ecosystem🦀 Resource for Intermediate UsersConclusion
[Latest updates: 2020–09–02]
Rust is a modern systems programming language focusing on safety, speed, and concurrency.
The following graph from The Benchmarks Game shows how Rust is fast comparing other programming languages. You can find a comparison against the Go language here.
In this article, you will find the basic Rust tools, latest documents, tutorials, videos, and online resources.
After reading this you can navigate yourself and start learning Rust programming language efficiently in a way that suits your learning style.
When you install Rust, you are installing rustc, cargo, rustup and other standard tools. So let’s find out what Rust toolchains do first before finding all resources.
Toolchains are a set of tools that help the language produce a functional code. They can provide extended functionality from either a simple compiler and linker program, or additional libraries, an IDE, or a debugger.
rustup installs the Rust programming language, enabling you to easily switch between stable, beta, and nightly compilers and keep them updated.
You can update Rust:
$ rustup update
rustc is the compiler for the Rust programming language. Compilers take your source code and produce binary code, either as a library or executable. You will use Cargo to run a Rust program instead of rustc.
You can find more details in the reference aboutrustc.
Cargo is the Rust package manager. Cargo downloads your Rust package’s dependencies, compiles your packages, makes distributable packages, and uploads them to crates.io, the Rust community’s package registry.
Clippy is a Rust linter.
rustfmt formats Rust code according to style guidelines.
You can find the official tool states in this link.
You can’t avoid The Rust Programming Language before you try other resources. This is the first and complete book you need to read about Rust. This book covers topics for beginners to advanced users. It explains all the details with a lot of examples and diagrams.
If you learn more from examples Rust by Example is for you. It is a collection of runnable examples that illustrate various Rust concepts and standard libraries. You can find more than 20 examples.
You can edit and run Rust codes from your browser.
You will find intermediate and advanced online resources at the end.
The Rust Cookbook is a collection of simple examples that demonstrate good practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
You can find a lot of information on the Rust official website.
A crate is a Rust binary or library and you can find the Rust community’s crate registry at https://crates.io/.
A package is one or more crates that provide a set of functionality. A package contains a Cargo.toml file that describes how to build those crates.
The Rust Standard Library provides the Rust standard library documentation.
The Rust Playground provides the top 100 most downloaded crates from craits.io and the crates from the Rust Cookbook.
Learn Rust provides guides and documentation you need.
You can find project tool libraries by categories at Awesome Rust.
Ferrous Teaching Material covers basics to advanced topics with slideshows. It provides sample codes and explanations are concise.
If you want to know about the Rust errors in detail, Rust Compiler Error Index list all Rust errors with examples.
Error in your terminal:
Error details in Rust Compiler Error Index:
If you like learning from videos, then the following videos will help you.
Rust: What is Ownership and Borrowing? by Gary Explains.
Ryan Levick created a series of Rust tutorials.
Genus-v Programming has Actix related video tutorials including authentication service, web development, and GraphQL with Actix.
Rust Web development | Boilerplate free with Rocket, June 2020, 22 min.
Rust Programming: Browser computation with WebAssembly, June 2020, 1 hr 55 min.
Video material curated by the Rust team.
Intro to Rust | COM209 teaches some of the basics of Rust, and then build and run a simple app. The video was taken in May 2020.
David Pedersen posted his live coding on Youtube and Twich.tv. They are from June 2020.
In Jonathan Teaches Jason Rust!, Jonathan attempts to teach Jason Turner Rust fundamentals in a couple of hours. This video was taken in May 2020, 3 hrs 36 min.
In 12 Things to Help You Learn Rust Gary explains loops, variables, functions, tuples, strings, and more. The video was taken in April 2020.
Learning Rust: Rustlings shows pair programming on some Rustlings exercises. The video was taken in August 2019.
Streaming Rust with Ryan Levick
Crust of Rust: Iterators from May 2020.
Build a Bitcoin-like Blockchain in Rust and Substrate from May 2020.
into_rust() is from 2016, but it explains the basic concepts such as ownership, shared borrows, and mutable borrows.
Baseline.Rust by zaitt.works.
Hello Rust!
Choosing Rust — Clint Frederickson Clint shares Iron his experience with choosing Rust and why it might be the right choice for your next project.
The Rustacean Station Podcast is a community project for creating podcast content for the Rust programming language.
If you like learning by doing, then these are for you.
Tour of Rust is a step by step guide through the features of the Rust programming language. It covers basics, basic control flow, basic data structure types, and Generic types.
rustlings has small exercises to get you used to reading and writing Rust code. You can use this along with The Rust Programming Language.
You can start the exercises:
rultlings watch
When you save the file, it will automatically check the answer and gives you feedback.
Once you completed an exercise, you need to remove the line:
// I AM NOT DONE
When you save the file, it will move on to the next exercise.
rustlings provides helpful hints giving the document link.
Exercism is 100% free code practice and mentorship. It is entirely open source and relies on the contributions of thousands of volunteers.
It will guide you on how to install it on your computer. You can learn not only Rust but also 50 other programming languages.
When you complete a coding challenge on your computer, you upload your solution and review it with a mentor.
towardsdatascience.com
towardsdatascience.com
towardsdatascience.com
Nelson Elhage is creating the Ultimate Tic Tac Toe with Rust.
Clear explanation of Rust’s module system by Sheshbabu Chinnakonda
DEV has more than 70 Rust related articles in June 2020.
If you are a JavaScript developer, Shesh has posts for you. e.g. Rust for JavaScript Developers — Functions and Control Flow.
A Gentle Introduction to Rust by Steve J Donovan
Build a Smart Bookmarking Tool with Rust and Rocket by Joe Previte
Extremely Simple Rust Rocket Framework Tutorial
Learning Rust
You can find about Rust libraries/crates in 24daysofrust.
Rust + Actix + CosmosDB (MongoDB) tutorial api
Extremely Simple Rust Rocket Framework Tutorial
Build a Smart Bookmarking Tool with Rust and Rocket
Rust Sokoban is an extended tutorial on making a Sokoban copy in Rust. It uses an existing 2D game engine, pre-made assets and by the end, it’ll have a fully working game. You can find examples of how to use it.
Learn Rust With Entirely Too Many Linked Lists. The online book teaches basic and advanced Rust programming by implement 6 linked lists.
A half-hour to learn Rust explains Rust keywords and symbols.
The Periodic Table of Rust Types: This table organizes Rust types into an orthogonal tabular form, making them easier to understand and reason.
Rust String Conversions
Rust Iterator Cheat Sheet
Rust Container Cheet Sheet
Rust Community page.
I highly recommend “This week in Rust”. It delivers weekly most up-to-date information about Rust.
“Rust Blog” is the main Rust blog. The core team uses this blog to announce big developments in the world of Rust.
“Inside Rust blog” is aimed a those who wish to follow along with Rust development.
Brian’s “Rust blog articles” page is organized by categories and has many blog articles.
If you are a C programmer, Cliff L. Biffle’s “Learn Rust the Dangerous Way” is for you.
Llogiq on stuff
Niko Matsakis
Rust Discord has many active members and one of the sections is for beginners.
Rust Users Forum is for help, discussion, and announcements related to the Rust programming language.
Stackoverflow has more than 16000 questions. Shepmaster who is the co-founder of the world’s first Rust consultancy answered many Rust questions.
Reddit’s “The Rust Programming Language” has 105K members.
· #rustlang, #learnrust, and #learningrust· Rust Language· Steve Klabnik· Aidan Hobson Sayers· Ashley Williams· Carol Nichols· Niko Matsakis· Nick Cameron· Pietro Albini· Lin Clark· Florian Gilcher· Kyle J Strand· This Week in Rust· Jonathan Turner
There are many Rust Meetup groups running online meetings. You can find meetings in Rust Community Calendar as well.
LeetCode has many problems you can solve online with Rust.
exercism.io has 92 exercises on the Rust track.
Sphere online judge has many problems you can challenge.
You take part in writing the code for games that you play directly online at CodinGame. You can write your code in Rust.
You can find Rust integration for your editor here. If you are a VS Code user, you can install rls-vscode extension.
Rust Language Server, the RLS provides a server that runs in the background, providing IDEs, editors, and other tools with information about Rust programs. It supports code completion, jumps to the definition, code formatting, and many more.
Rust Lang Compiler Team create the rls-2.0 working group. The goal is to make better user RLS experience.
You can find their implementation in the rust-analyzer and the rust-analyzer supports different IDEs.
You can find how much your editor supports Rust at Are we (I)DE yet?
You can find many libraries at crates.io. Here are some of the categories you might be interested in.
Actix is the fastest framework according to Web Framework Benchmarks. There are ten active Rust web frameworks. Actix, Rocket, Gotham, Seed, etc. You can find more information from the web framework comparison.
Simple Rocket Web Framework Tutorial | POST Request
The fastest Rust template engine, sailfish. It claims 200x faster than handlebars.
If you are interested in WebAssembly, then the following links will help you.
Rust official page on WebAssembly
WASM working group and Rust and WebAssembly book by the group.
Rust and WebAssembly from Scratch: Hello World with Strings
Getting started with WebAssembly and Rust
WebAssembly with Rust and React (Using create-react-app)
Using Rust and WebAssembly to Process Pixels from a Video Feed
Understanding WebAssembly text format
Compiling from Rust to WebAssembly
Bringing WebAssembly outside the web with WASI by Lin Clark explains how WASI works and explore how different use cases can benefit from it.
Yew is a Rust/Wasm framework for building client web apps.
Rust + WebAssembly — EdgeXR @ Netlight by Aleksander Heintz
Rust official page on Networking.
Rust official page on Embedded devices.
The Embedded Rust Book.
Rust bindings for the FLTK Graphical User Interface library, fltk-rs. The video tutorial is here.
Data Science at Home has a series of podcasts on Rust and machine learning.
Amadeus provides a harmonious distributed data analysis in Rust.
ndarray is equivalent to Python’s numpy.
Porting Godot Games To Rust (Part 1)
Rust Game Development Working Group has monthly newsletters.
The ggez is a lightweight game framework for making 2D games with minimum friction. It aims to implement an API based on (a Rustified version of) the LÖVE game framework. It contains portable 2D drawing, sound, resource loading, and event handling.
Specs is an Entity-Component System(ESC) written in Rust. It is the most popular ESC library.
godot-rust is Rust bindings to the Godot game engine.
Gorgeous Godot games in Rust.
Legion ECS with Godot and Rust.
Rust official page on Command-line apps.
Rustbox is a library that provides API which allows the programmer to write text-based user interfaces.
Tui-rs is a Rust library to build rich terminal user interfaces and dashboards.
Termion is a pure Rust, bindless library for low-level handling, manipulating, and reading information about terminals.
Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform text-based interfaces.
Pancurses is a curses library for Rust to provide a more Rustic interface over the usual curses functions for ease of use while remaining close enough to curses to make porting easy.
StructOpt parses command line arguments by defining a struct. It combines clap with custom derive.
clap or Command Line Argument Parser is a simple-to-use, efficient, and fully-configurable library for parsing command line arguments.
Gtk-rs is Rust bindings for GTK+ 3, Cairo, GtkSourceView and other GLib-compatible libraries. It provides many UI widgets out-of-the-box.
OSDev, Operating System Development in Rust posts give a regular overview of the most important changes to the RustOSDev tools and libraries.
bindgen automatically generates Rust FFI bindings to C (and some C++) libraries.
PyO3 includes running and interacting with Python code from a Rust binary.Mara’s Blog goes through the process of creating inline-python.
You can find more bindings at carates.io.
Serde is a framework for serializing and deserializing Rust data structures.
Serialization takes an in-memory data structure and converts it into a series of bytes that can be stored and transferred. Deserialization takes a series of bytes and converts it to an in-memory data structure that can be consumed programmatically.
Diesel is a Safe, Extensible ORM and Query Builder for Rust.
If you feel adventurous, you can check one of the following.
Command Line Applications in Rust has great exercises for a beginner who is new to the language and writing a program with a simple command-line interface (CLI). You’ll be exposed to a few of the core concepts of Rust as well as the main aspects of CLI applications.
Rust API Guidelines is a set of recommendations on how to design and present APIs for the Rust programming language.
The rustc book rustc is the compiler for the Rust programming language. Compilers take your source code and produce binary code, either as a library or executable.
The Cargo book tells you all about Cargo.
You can read about Rust’s new large changes in The Edition Guide.
Rust Language Cheat Sheet is for experienced programmers and intermediate Rust users. If you prefer visual example-driven content, this is for you. You can download a PDF from it’s Github repo.
Rust Forge serves as a repository of supplementary documentation useful for members of The Rust Programming Language.
The Rust Reference is the primary reference for the Rust programming language. It provides language construct and use, the memory model, concurrency model, runtime services, and more.
Philipp Oppermann wrote Writing an OS in Rust.
Michael F Bryan wrote about ArrayVec in Implementing ArrayVec Using Const Generics.
Diving into Rust with a CLI shows how to create a CLI application.
dtolnay wrote about Rust macro development case studies.
A practical guide to async in Rust by Carl Fredrik Samson
Secure Rust Guidelines — ANSSI (National Cybersecurity Agency of France)
Rust OpenCV bindings
Embedded development
Rust Design Patterns
Tips for Faster Rust Compile Times
Rust verification tools
Learning Rust: Let’s Build a Parser
Small strings in Rust
Servo is a modern, high-performance browser engine designed for both application and embedded use.
MICHAEL-F-BRYAN is writing Rust articles.
Barely Functional is writing Rust articles.
Niko Matsakis writes his ideas on Rust.
learn-opengl-rs
vulkann-tutorial-rs
Ferrous Teaching Material
embedded-trainings-2020
There is a milliard of online resources. I hope you found the most suitable learning resource and start learning Rust Programming Language.
Please let me know if I missed anything.
Get full access to every story on Medium by becoming a member.