Close-up photo of 3 snake bodies (or 3 parts of the same snake body) stacked on top of each other.

Workshop: 1 day

Rust-Python Interoperability

Bookable for teams – on-site or remote

Workshop description

Book this workshop

Our mentors look forward to working with your team and unlocking new capabilities.
Get in touch
1

Introduction to Rust-Python Interoperability

We kick off with looking at the advantages of combining Rust and Python, understanding where each language shines and why interoperability is valuable. This module introduces tools like PyO3, which enables Rust code integration within Python environments, and maturin, a library for building, packaging and publishing Python extensions written in Rust.

2

Building Python Extensions in Rust

We'll continue with the process of creating Python-callable Rust functions, setting up projects using PyO3, and configuring the development environment to handle Rust extensions in Python.

3

Managing Data and Types

Next, participants will learn how to handle complex data structures shared between Rust and Python, with a focus on type conversions, data ownership, and ensuring memory safety across both languages.

4

Concurrency and the GIL

The workshop covers Python’s Global Interpreter Lock (GIL) and strategies for concurrent programming, including async programming in Rust that can enhance Python’s parallel processing capabilities.

5

Creating Python Classes with Rust

We move on to explore creating Python-accessible classes directly in Rust using PyO3's #[pyclass] attribute. This module teaches struct definition, implementing methods, and adding Rust-based functionality to Python classes.

6

Static Methods and Inheritance

The final module details adding static methods to Rust-backed Python classes, along with managing inheritance and visibility in Python environments.

Your mentor

Luca Palmieri

Principal Engineering Consultant

Luca Palmieri builds technology products for a living. His current focus is on backend development, software architecture and the Rust programming language. He is the author of "Zero to Production in Rust".

Book this workshop

Our mentors look forward to working with your team and unlocking new capabilities.
Your message is being sent…

Unable to send message.

Please try again later or contact us at info@mainmatter.com

Thank you!

We will be in touch soon.

Not the right workshop for you?

Take a look at our wide range of workshops to take your team to the next level
Our workshops

Stay up to date on Rust

Subscribe to our newsletter and stay up to date about the latest events, workshops, and other news around Rust.