Using PyPy is supported via cpyext.
Support is only provided for building Rust extension for code running under PyPy. This means that PyPy cannot be called from rust via cpyext. Note that there some differences in the ffi module between PyPy and CPython.
This is a limitation of cpyext and support for embedding cpyext is not planned.
Compilation against PyPy is done by exporting
PYO3_PYTHON to point to a PyPy binary or by compiling in a PyPy virtualenv.
PYO3_PYTHON="/path/to/pypy3" /path/to/pypy3 setup.py install
These are features currently supported by PyO3, but not yet implemented in cpyext.
- Complex number functions (
- Conversion to rust's i128, u128 types.
PySequence_Count(which is used to count number of element in array)