The Python community is chewing over a new idea: allowing the C-based reference implementation, CPython, to incorporate Rust. It’s only at the “pre-PEP” stage, but it’s already sparked lively debate.
It’s a pre-PEP because official Python proposals are called PEPs, short for Python Enhancement Proposals. The idea has been bruited by two core Python developers, Emma Smith and Kirill Podoprigora, who write:
The post is very readable, and it addresses several of the more obvious objections. For example, it lists the 20 core platforms that CPython officially supports, and notes that all have some level of Rust support – although 11 of them are Tier 3 platforms for Rust. It also creates an interesting cyclic dependency for bootstrapping the Python interpreter: building Rust from scratch depends on Python. In other words, if you don’t have any form of Python on your computer, you will need Rust to build it – and currently, if you don’t have any form of Rust, you need Python.
It also notes a handful of platforms CPython runs on that have no Rust support whatsoever, including Reg FOSS desk favorite RISC OS, as well as HP PA-RISC, Mac OS X on PowerPC, and CentOS Linux 6.
CPython has special status because it is the official reference implementation of the Python language, but it is just one of a great many implementations, including 12 variants of CPython itself, plus 15 working versions in other languages – of which one is RustPython – and many more besides.
We are strongly reminded of the recent moves for Debian’s APT to require Rust, which is similarly likely to leave some older platforms stranded – including Debian for HP PA-RISC.
We were going to go for a tentacle simile, but Rust’s mascot is a crab, so perhaps the Atlantic spider crab or Alaskan king crab are better comparisons. All can be highly invasive in some environments, but often they are welcomed because they are, apparently, delicious.
As Rust’s reach grows like a spider crab’s legs, it seems to us that for both Debian’s APT and soon perhaps CPython, one of two possible outcomes must happen. Either the communities behind some minority platforms invest real effort into ensuring that they have Rust support – and do it soon – or they will be left behind by the continuing technological evolution of modern FOSS. ®
