Skip to content

Bringing Rust to Python developers: lessons from our internal training

Here’s how we introduced our Python-focused engineering team to Rust, what we learned, and how Rust is already making an impact on our projects.

Tom Shlomo •

At Via, we recently introduced our Python-centric Algorithms team to Rust programming. Recognizing the number of benefits Rust could bring to our organization, we adapted the Comprehensive Rust course developed by Google's Android team to suit our team’s needs. 

While this post will cover some of the highlights of this journey, we invite you to take a look at our course’s material where you’ll find slides, exercises, solutions, and even a suggested schedule. We hope the course is helpful in itself or inspires your own Rust journeys.

Why Rust?

Our decision to offer this course stemmed from a desire to promote Rust adoption within Via as a means of enhancing the quality of work and developing our engineers' skill set. We believe Rust's unique combination of performance, safety, and resilience aligns perfectly with our organizational goals. By familiarizing our team with Rust, we aimed to inspire them to explore its potential and begin immediately incorporating it into their projects.

Course objectives.

We structured the course around three primary objectives:

1. Why we should use Rust. Rust’s rich type system, strong performance, and modern tooling all contribute to writing reliable and efficient software. Its emphasis on safety enables developers to catch potential bugs early in the development process, reducing runtime errors and improving overall code quality.

2. Demonstrating that it’s easier than it seems. Despite its complexities, building reliable and high-performance software with Rust is achievable

3. Building confidence and motivation. In this course, we aim to equip our team with the knowledge, skills, and confidence needed to begin incorporating Rust into their work

Tailoring the course.

While Google’s course is a great resource, we found that some parts were more oriented towards C++ developers, whereas the dominant language at Via is Python. As a result, we made several adjustments to the curriculum, skipping some sections and adding others, including several exercises. For example, we added a section on using PyO3 to create native Python extensions and an exercise focused on building a GTFS data processor in Rust with a Python API.

Outcomes.

After the workshop, we surveyed to gather feedback from the participants. 90% of respondents expressed a desire to start using Rust in their projects and over 75% said they felt confident doing so immediately.

Since then, several Rust projects are already in the works and we expect a significant expansion in our Rust codebase in the coming months. Rust's efficiency, reliability, and robustness have unlocked a new pipeline of efforts and possibilities that we are exploring at Via. 

We hope the materials in this post and the accompanying website can inspire you and your team to explore Rust further. Stay tuned for the next post, where we will take a deeper look at how Rust helped improve a core component of our route optimization engine. Happy coding!

Tom Shlomo avatar
Tom Shlomo

Algo Researcher at Via