Learning to Oxidise your Python Project with some Rust

Swarnim Arun (~swarnim)


This is to help share my learning of oxidising Python Project to help, Python projects be faster while staying safe and maintainable.

Oxidising is a faster and safer way of making your Python Projects much more performant, due to Rust's safety guarantees from the Ownership & Borrowing system(Affine Type System) and Higher Level Abstractions while maintaining lower level control.

We have numerous C modules that are used in Python but C is not really a very safe language and producing such libraries is a tedious task.

Whereas using something like Rust would make the process much easier because it both offers better Safety and Tooling that allows for rapid development of small oxidization modules to the code for increasing the performance overall.

Also libraries PyO3 provide a very unintrusive way of adding Rust Modules to your Python Project. This means you don't have to change a single line of code on python side, just import the module and you are good to go. :)

Outline of the talk:

  • Why is Python slow and why it's not something we can just fix.? (Hint: The answer includes GIL)
  • Understand why Rust is a better solution for the problem over C and other modern languages like Go, D etc.
  • Show some examples of the use of Rust Modules using PyO3/rust-cpython.
  • Quick setup and explain the integration of Rust in the workflow you may have.
  • Discuss some ideas of how to and how not to use them in actual projects.
  • Some extra tools of the job: PyOxidiser, setuptools-rust, PyO3-pack


Understanding of the Basics of Python, and Tooling around it. A greater understanding would surely help.

Here's a quick list of topics you might want to have a look at before this talk(Quick Google Search should be enough),

  • Threads
  • Interpreters
  • FFI / Foreign Function Interfaces

Speaker Info:

Swarnim Arun, I am a college student with a love for programming and learning new things. Hobbyist game developer and open source contributor.

Currently working with Web Technologies and Android. With most of his experience being in lower-level system projects.

Id: 1195
Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated: