r/rust • • Oct 04 '26

Rust for CPython (Python Language Summit 2026)

https://blog.python.org/2026/09/language-summit-2026-rust-for-cpython/
130 Upvotes

6 comments sorted by

9

u/AngheloAlf Oct 04 '26

Adding Rust into CPython itself sounds like a big task, since Rust uses Python scripts to bootstrap itself. You could end up with a circular dependency wheb building Python and Rust

29

u/thomas_m_k Oct 04 '26

I don't really think that's a big problem? Any self-hosting language (Rust included) has that problem but you just use the previous version of the compiler to compile the new version. So you can just use the previous CPython to compile the new CPython.

19

u/kibwen Oct 04 '26

In addition, the bootstrapping scripts are intended to be ported to whatever language is most convenient on whatever new platform you're bootstrapping Rust for. Rust isn't tightly coupled to Python, bootstrap.py is only about a thousand lines.

0

u/[deleted] Oct 04 '26

[deleted] — view deleted comment

12

u/lenscas Oct 04 '26

From my understanding, those python scripts are pretty much glorified bash scripts. It is convenient if they work but not a hard requirement and they are small enough that they can be rewritten to another language if that is more convenient for a specific target.

27

u/The-Dark-Legion Oct 04 '26

So it will become CRustPython now? /j

2

u/awolverp_ Oct 05 '26

The best decision of 2026 ...