All Other Programming Languages C-Languages Rust
When your Python needs to be fast, one powerful tool is the ability to write compiled extension modules. Normally this is done using the C API, but that requires managing reference counts and memory allocation and is nearly impossible to do *correctly* for non-trivial programs. In this talk, we'll look at how you can write extension modules in Rust - a memory-safe systems programming language that is increasingly popular as a replacement for C and C++, and the [most loved language in the Stack Overflow developer survey 4 years running](https://insights.stackoverflow.com/survey/2019#technology-_-most-loved-dreaded-and-wanted-languages).
This talk will focus on `pyo3` and `milksnake`, two popular libraries that provide very different approaches for writing Rust extensions; it will cover a basic introduction to the libraries, and compare their relative strengths and weaknesses. These will also be compared to C and Cython extension modules from a performance, safety and maintainability perspective.
Type: Talk (30 mins); Python level: Intermediate; Domain level: Intermediate
Paul Ganssle is a software developer, maintainer of python-dateutil and setuptools and contributor to many other open source projects. He lives in New York City and is interested in programming, languages, wearable electronics and sensors.
Expressions of opinion do not necessarily reflect the views of his employer.