Sven Hendrik Haase - Rust and Python - Oxidize Your Snake
Channel: EuroPython Conference
Date: 06/09/2018

Rust and Python - Oxidize Your Snake
[EuroPython 2018 - Talk - 2018-07-27 - Lammermuir]
[Edinburgh, UK]

By Sven-Hendrik Haase

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.



License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/
Please see our speaker release agreement for details: https://ep2018.europython.eu/en/speaker-release-agreement/