@@ -834,3 +834,41 @@ after every statement run by the interpreter.)
834834
835835Please refer to :file: `Misc/SpecialBuilds.txt ` in the Python source distribution
836836for more detailed information.
837+
838+
839+ .. _c-api-tools :
840+
841+ Recommended third party tools
842+ =============================
843+
844+ The following third party tools offer both simpler and more sophisticated
845+ approaches to creating C, C++ and Rust extensions for Python:
846+
847+ * `Cython <https://cython.org/ >`_
848+ * `cffi <https://cffi.readthedocs.io >`_
849+ * `HPy <https://hpyproject.org/ >`_
850+ * `nanobind <https://github.com/wjakob/nanobind >`_ (C++)
851+ * `Numba <https://numba.pydata.org/ >`_
852+ * `pybind11 <https://pybind11.readthedocs.io/ >`_ (C++)
853+ * `PyO3 <https://pyo3.rs/ >`_ (Rust)
854+ * `SWIG <https://www.swig.org >`_
855+
856+ Using tools such as these can help avoid writing code that is tightly bound to
857+ a particular version of CPython, avoid reference counting errors, and focus
858+ more on your own code than on using the CPython API. In general, new versions
859+ of Python can be supported by updating the tool, and your code will often use
860+ newer and more efficient APIs automatically. Some tools also support compiling
861+ for other implementations of Python from a single set of sources.
862+
863+ These projects are not supported by the same people who maintain Python, and
864+ issues need to be raised with the projects directly. Remember to check that the
865+ project is still maintained and supported, as the list above may become
866+ outdated.
867+
868+ .. seealso ::
869+
870+ `Python Packaging User Guide: Binary Extensions <https://packaging.python.org/guides/packaging-binary-extensions/ >`_
871+ The Python Packaging User Guide not only covers several available
872+ tools that simplify the creation of binary extensions, but also
873+ discusses the various reasons why creating an extension module may be
874+ desirable in the first place.
0 commit comments