Author: Donghee Na
Created at: 2025-11-18 01:15
Number: 52
Clean content: emmatyping: but that doesn’t mean other important runtime things can’t be Rust, brettcannon: I agree, but a “C codebase as safely as possible” is still less safe than a code base in Rust. And now that we have a decade-old systems language that’s safer than C, I think it behooves us to at least try and see if we can make it work. Just to clarify: I love using Rust, and I’m one of the people interested in bringing Rust into CPython. I’ve talked about this topic in the context of JIT because of its practical advantages. @emmatyping What I’m curious about is this: in the current PoC, most of the code uses unsafe blocks. I understand this isn’t Rust’s fault but rather a limitation of the CPython API. Still, how do these modules become memory-safe in the PoC, and how much less do we need to worry about memory safety compared to writing the same code in C? For example, if you could say something like “X% of the code in the base64 module becomes memory-safe,” that would be a helpful metric to highlight. Also, do you have any plans to remove the unsafe blocks in modules like base64 ? If so, could you include that plan in the PEP? Another thing: could you compare build times and performance between the C version (with PGO + LTO) and the Rust build? I think that would make the PEP much more balanced and fair for reviewers.
