Skip to main content
CF

Let’s Rust

12h 40m 9s
English
Paid

This course is live and hands‑on. You build a full ML service in Rust step by step. You train a model, save it, serve it with a REST API, and deploy it on Kubernetes. We skip long theory. You write code, ask questions, and focus on the result.

What You Build

Training Pipeline

You load data from CSV, prepare features with Polars, train a model, and save the artifact.

Simple Model Store

You upload the saved model to Amazon S3 and fetch it from your service.

REST API for Predictions

You write a Rust service that loads the model, reads input, and sends a clear response.

Demo Deploy on Kubernetes

You build the image, package the app, and launch it on a small cluster.

Why Rust

Pros

  • Fast code and low memory use help cut runtime costs.
  • Strict types help you avoid many bugs.
  • The tools guide you to safe code.

Cons

  • The syntax feels complex at first.
  • You must get used to the compiler and its checks.
  • You will not "master Rust in a week", but you will build a real app and learn core ideas like structs, traits, crates, and package use.

Course Result

You finish with a working ML service in Rust. You learn the core parts of the Rust stack and gain the habits needed to ship real tools. You also become more precise in Python, as a second language helps you see design choices more clearly.

About the Author: Pau Labarta Bajo

Pau Labarta Bajo thumbnail

Pau Labarta Bajo is a Spanish ML engineer and educator who runs the Real-World Machine Learning teaching brand and a popular newsletter on production ML systems. His material focuses on the engineering side of ML — feature stores, model serving, monitoring — rather than on the math-heavy theory side that dominates academic ML coursework.

His CourseFlix listing carries two Pau Labarta Bajo courses: The Real-World ML Tutorial and Let's Rust (ML + Rust). Material is paid and aimed at engineers transitioning into production ML work.

Watch Online 64 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 64 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Introduction to the course
All Course Lessons (64)
#Lesson TitleDurationAccess
1
Introduction to the course Demo
08:20
2
What is the goal of this course?
08:52
3
Why Rust?
15:17
4
Our plan
10:43
5
Installing the tools: rustc, cargo, rust-analyzer
16:28
6
How to generate and run the binaries
21:04
7
Steps to train an ML model in Rust
10:00
8
How to download the CSV file - Part 1
26:56
9
How to handle errors and Results with anyhow and ?
20:22
10
Generic types, traits and trait bounds in function definitions
23:10
11
How to download the CSV file - Part 2
10:37
12
Wrap up
03:17
13
Goals for today
05:04
14
Load the CSV file into memory with Polars Rust
18:15
15
Extract functions to lib.rs
05:11
16
Splitting the data into training and test - Part 1
25:31
17
Splitting the data into training and test - Part 2
18:33
18
Questions and answers
04:06
19
Split datasets into features and targets
12:21
20
Transforming Polars DataFrame to DMatrix for XGBoost training
24:43
21
Training the XGBoost model - Part 1
20:48
22
Questions and answers
02:53
23
Training the XGBoost model - Part 2
12:04
24
Pushing the model artifact to AWS S3 bucket
18:41
25
How to set up your AWS credentials to talk to your S3 bucket
01:48
26
Wrap up
01:49
27
Goals for today
03:35
28
Tip -> devcontainers
05:08
29
Add 2 entry points, one for training, one for REST API
05:55
30
Questions and answers
02:35
31
Building a minimal API with health endpoint - Part 1
19:55
32
Building a minimal API with health endpoint - Part 2
10:25
33
Adding a predict endpoint to our REST API
22:20
34
Tip -> How to break a large problem into smaller (easier) ones
02:34
35
Download model artifact from AWS S3 bucket
23:37
36
Refactorings -> Break our lib.rs into separate files
17:27
37
Adding CLI parameters for training using Clap
11:24
38
Loading the model from S3 into memory
07:39
39
Adding model to the AppState so we can use it in our predict functions - Part 1
21:03
40
Adding model to the AppState so we can use it in our predict functions - Part 2
07:46
41
Wrap up
02:32
42
Plan for today
02:17
43
Transform input payload to dmatrix for XGBoost
21:04
44
Formatting the response with the prediction
15:42
45
Extracting the port number as input argument
07:26
46
Two challenges for you
11:22
47
Dockerizing the API - Part 1
20:40
48
Trick -> How to solve Docker no space left problems
06:49
49
Dockerizing the API - Part 2
23:00
50
Dockerizing the API - Part 3
22:35
51
Dockerizing the API - Part 4
21:47
52
Dockerizing the API - Part 5
07:43
53
Dockerizing the API - Part 6
01:51
54
Wrap up
02:37
55
00 - Intro
02:49
56
01 - Bootstrap the project
04:27
57
02 - Hello world with a /health endpoint
21:43
58
03 - A bit of refactoring
02:58
59
04 - Add a /predictions endpoint
08:39
60
05 - Break down project in several files
08:28
61
06 - Start Postgres DB with Docker
07:52
62
07 - Fetch data from Postgres
20:28
63
08 - Loading environment variables
02:07
64
09 - Add GET parameter to the /predictions endpoint and compile for release
04:57
Unlock unlimited learning

Get instant access to all 63 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Books

Read Book Let’s Rust

#TitleTypeOpen
1session 1 PDF
2session 2 PDF

Related courses

Frequently asked questions

What are the prerequisites for enrolling in the course?
The course assumes a basic understanding of programming concepts but does not require prior experience with Rust. Familiarity with machine learning concepts will be beneficial, as the course involves building an ML service. Additionally, knowledge of using cloud services like AWS S3 can be helpful but is not mandatory as the course covers setting up AWS credentials.
What projects will I build during the course?
Throughout the course, you will build a complete machine learning service in Rust. This includes developing a training pipeline to load data, prepare features with Polars, and train a model. You will also create a simple model store by uploading the model to Amazon S3 and fetching it from your service. Finally, you will build a REST API for predictions and deploy the application on Kubernetes.
Who is the target audience for this course?
The course is designed for developers interested in learning Rust and applying it to machine learning services. It's suitable for those looking to enhance their skills in building scalable and efficient software, as well as individuals aiming to integrate Rust into their existing workflows, especially when performance and safety are critical.
How does the depth and scope of this course compare to similar courses?
This course emphasizes hands-on learning and practical application over theoretical instruction. Unlike some courses that focus heavily on Rust syntax and theoretical concepts, this course guides you through building a real-world ML service, covering essential topics like structs, traits, crates, and package use, while providing experience with tools like Polars, AWS S3, and Kubernetes.
What specific tools and platforms will I learn to use?
The course introduces several tools and platforms essential for developing a machine learning service in Rust. Key tools include rustc, cargo, rust-analyzer for Rust development, Polars for data manipulation, XGBoost for model training, AWS S3 for model storage, and Kubernetes for deployment. Additionally, you'll learn to use Clap for CLI parameters and Docker for containerization.
What topics or tools are not covered in this course?
The course does not cover advanced Rust topics beyond the basics necessary for building the ML service, such as memory management, concurrency, or low-level system programming. It focuses on the practical application of Rust in building an ML service, so topics like advanced data science techniques, other machine learning frameworks, and in-depth cloud infrastructure management are not included.
What is the estimated time commitment for completing the course?
The course consists of 64 lessons and is designed to be completed at a pace that accommodates interactive learning and practical application. While the exact time commitment can vary based on individual experience and learning speed, students should expect to engage with the material actively, including coding exercises, which may take several weeks to complete thoroughly.