Author: Mark Shannon
Created at: 2025-11-20 09:58
Number: 156
Clean content: Personally, I think this makes a lot of sense for extension modules and some components, but not so much for the core of the VM (the interpreter, gc, and core objects). The safety, or lack of safety, of those components depends not so much on the language they are written in, but the design. If you feed dodgy bytecode to the interpreter it should crash, or worse. That’s how it is supposed to work. What is the proposed API for rust? The section on implementation talks about using bindgen, but what is the underlying C API that you are binding? The limited API or the warts-and-all “unlimited” API? You mention PY_OBJECT_HEAD_INIT but that just couples rust code to the deep internals of the VM. If we are introducing a new API, then it should be a good one. It should follow the design on HPy , or its successor PyNI . The linear typing of HPy handles should work very well with rust’s ownership model.
