Skip to content

Learn Rust with uByte

Learn Rust programming for free with uByte. Interactive Rust tutorials for beginners — write and run real code in your browser.

All Tutorials

1

Getting Started with Rust

Write your first Rust program, understand the main function, and learn how Rust compiles and runs.

beginner10 min
2

Variables and Types in Rust

Explore Rust's immutability, scalar types, String vs &str, shadowing, constants, and tuples.

beginner15 min
3

Output and Formatting in Rust

Master println!, print!, debug formatting, number precision, and padding in Rust.

beginner15 min
4

Control Flow in Rust

Master if/else expressions and match for decisions in Rust.

beginner15 min
5

Loops in Rust

Use loop, while, and for to repeat code and iterate in Rust.

beginner12 min
6

Arrays and Slices in Rust

Work with fixed-size arrays and slices in Rust.

beginner15 min
7

HashMap in Rust

Store and look up key-value pairs with std::collections::HashMap.

beginner12 min
8

Functions in Rust

Define and call functions; pass arguments and return values.

beginner12 min
9

Ownership and References in Rust

Understand ownership, borrowing, and references in Rust.

intermediate15 min
10

Structs in Rust

Define structs, create instances, and use field access.

beginner12 min
11

Methods and impl in Rust

Add methods to structs with impl blocks.

beginner12 min
12

Traits in Rust

Define shared behavior with traits and implement them for types.

intermediate15 min
13

Error Handling with Result in Rust

Use Result and Option for fallible operations; the ? operator.

beginner12 min
14

Crates and Modules in Rust

Organize code into modules and use the standard library.

beginner10 min
15

Threads and Channels in Rust

Spawn threads and communicate with channels (std::sync::mpsc).

intermediate15 min
16

Testing in Rust

Write and run unit tests with #[test] and cargo test.

intermediate12 min
17

HTTP in Rust

Make HTTP requests using reqwest or std library basics.

intermediate12 min
18

JSON in Rust

Parse and serialize JSON with serde_json or manual string building.

intermediate12 min
19

Iterators and Closures in Rust

Use iterators, closures, and iterator adapters (map, filter, collect).

intermediate15 min