Loading Events
  • This event has passed.
23 Sep 2025 15:00 - 18:00
Event Tags:
, ,
Zenika –
53 rue de Châteaudun
75009 Paris, France

Introduction to Rust for Python: Speed Up Your Code with PyO3 Rust Bindings


 

Recently, Rust has gained more and more popularity as a Programming Language for two reasons:
– Rust is really fast (comparable to C++)
– Rust is secure (safer than C++)

But more importantly, there is one Rust feature that made it a clear game-changer for us, data experts: It is highly integrated within the Python ecosystem, thanks to PyO3, which is called a Rust binding for Python.
Essentially, PyO3 allows developers to easily compile and import Rust code as Python modules.

In this workshop, we will introduce you to:
1. Basics of Rust – Understanding the language essentials (30-40 min)
2. Usage of Cargo – Rust’s package manager (10 min)
3. Usage of PyO3 to compile Rust code and use it in a Python script (20-30 min)
4. Follow-along full working example: finding the nearest neighbors of a large number of polygons (100x speedup compared to naive python) – (40-60 min)
5. Additional demos on ML algorithms: KMeans, Multi-Label Stratification.. (30-40 min)

Resources:
https://msrc.microsoft.com/blog/2019/07/a-proactive-approach-to-more-secure-code/
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust.html

< All past workshops