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