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

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

The datacraft team

By datacraft

Date and time

Location

3 Rue Rossini

3 Rue Rossini 75009 Paris France

About this event

  • Event lasts 3 hours

This event is reserved for our members, but we still have a few places available for those who would like to discover the club. Don't hesitate to sign up - you'll be put on a waiting list and we'll confirm your place a days before the event.

he datacraft team

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

2509-datacraft-Rust4Python

Organized by

FreeSep 23 · 5:00 PM GMT+2