Modern Rust tour

Contents
Editions 2015 to 2024
Async exists
Const generics note
Follow the release train

Editions 2015 to 2024

Rust ships a new stable release every six weeks, yet old code keeps compiling. Editions are the trick: each crate opts into a rule set, and the compiler honors every rule set from 2015 through 2024 side by side.

The guarantee is simple: a new edition never silently changes what your old code means. Plain code like this loop compiles under every edition:

fn main() { let langs = ["rust", "c", "go"]; for lang in langs { println!("{}", lang); } }

Migrate editions only when a new feature tempts you, never out of fear.

Async exists

Async Rust exists for waiting on thousands of sockets without thousands of threads. The idea is small: mark waiting code async and let an executor park it until data arrives.

The standard library ships the language pieces, while executors such as tokio live outside it and are out of scope for this course. Everything here stays blocking and single threaded on purpose, because blocking code is easier to reason about first.

Const generics note

Types can carry numbers, not just other types. A const generic lets one function accept arrays of any length while the length stays checked at compile time:

fn len_of<T, const N: usize>(arr: [T; N]) -> usize { arr.len() } fn main() { println!("len: {}", len_of([1, 2, 3])); }

N is part of the type, so mixing lengths is a compile error instead of a runtime surprise. That is the whole note: reach for const generics when the size belongs in the signature.

Follow the release train

Follow the release train and Rust improves under you. Read the release notes every six weeks, run rustup update, and fix the few warnings before they turn into errors.

Stable first, beta if curious, nightly only when an experiment demands it. This habit matters more than any single feature in this tour.

Next: Hero roadmap: the whole course on one page

Article author: Arthur Isaev

Related articles
Rust
Rust course: zero to hero in 50 lessons
What is Rust and where it runs
Install Rust
cargo new
Your first program
Variables
Numbers
Strings
Booleans
Tuples
Arrays
Vectors
Slices
if and else
match
Loops
Ownership
Borrowing
Lifetimes
Functions
Structs
Enums in Rust
Advanced match in Rust
Option combinators in Rust
Result and the question mark in Rust
Advanced strings in Rust
Vec methods in Rust
HashMaps in Rust
Modules in Rust
Crates and workspaces in Rust
Testing in Rust
Error handling
Traits
Generics
Trait bounds
Closures
Iterators
Smart pointers
Threads
Mutex and Arc
Files
CLI arguments
Environment variables
Diagnostics
Time
Parsing strings
TCP networking
Capstone: wordfreq CLI
Capstone: tiny HTTP server
Modern Rust tour
Hero roadmap: the whole course on one page
Install Rust on Windows 11
Install Rust on Ubuntu
Install Rust on Rocky Linux
Install Rust on macOS
Install Rust on FreeBSD
Rust in Docker

Search this site

Channel @aofeed Chat @aofeedchat

Contacts and cooperation:
I recommend our hosting beget.com
Write to info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: