Hacker News new | past | comments | ask | show | jobs | submit login

Cpython also has a limited stable abi and cp3X-abi3 wheels are compatible across multiple versions of Python.

https://docs.python.org/3/c-api/stable.html




But it is very limited. Understandably so, as they don't want to ossify the internal APIs, but it still is so limited that you can't actually build anything just using just that API as far as I know.


I checked now - polars is built using py abi3 wheels, and for me that means that you can build something substantial using the stable ABI! :)

See https://pypi.org/project/polars/1.9.0/#files cp38-abi3 wheels means they are compatible with cpython 3.8 or later.


Woah! Okay, that's very cool. I thought it was much more limited than that (for the stable abi). Awesome!

It seems like they use mostly normal python as a bridge with the rust codebase. So from what I've seen on their repo, they mostly do not use any CPython APIs (a part from a few wrappers I think). Which makes sense!


That makes sense: I would assume polars mostly converts from Python to rust at the edge then it works in rust internally.

Though I’ve not really looked at the details I’d assume most of the missing stuff would be “intimate” APIs of builtin types. And all the macros leveraging implementation details.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: