Contribute Media
A thank you to everyone who makes this possible: Read More

Rust and Python - Oxidize Your Snake


Rust is a safe and modern systems programming language that is easily able to call and be called from Python. As such, it is a prime candidate for replacing C for writing Python modules that have to be fast or that have to interact with other native code. Rust is extremely fast and makes it very hard to get concurrency wrong.

Many ways of making Python call into lower level have appeared over the years such as CFFI, ctypes, boost.python, cython, SWIG. All of them are cumbersome in their own ways. PyO3 is a Rust library that makes it easy and simple to write native Python modules with minimal glue code and no crazy tooling required. It even works cross-platform without problems.

The talk shows some sample code of PyO3-based modules and compares it with the code of the alternatives as well as the alternative’s cross-platform support and tooling.

The goal is for the audience to be informed about a new safe and modern way of writing native Python modules.

The audience doesn’t need any prerequisites except for a healthy interest in native code and Python modules. C knowledge is optional.


Improve this page