awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
pybind avatar

pybind/pybind11

0
View on GitHub↗
17,913 星标·2,307 分支·C++·5 次浏览pybind11.readthedocs.io↗

Pybind11

pybind11 is a header-only C++ binding library that exposes C++ functions and classes as Python modules. It serves as a language bridge, mapping native types, inheritance hierarchies, and lambda functions into compatible Python objects to enable high-performance native code execution.

The library includes specialized integration for NumPy arrays, utilizing buffer protocols to bind native C++ data without copying memory. It provides a toolkit for mapping C++ standard library data structures and smart pointers into the Python environment while maintaining cross-language memory management.

The project also covers native library integration, object serialization, and support for various Python runtime implementations. It utilizes build preset configurations to ensure consistent compilation across different environments.

Features

  • C++ Extension Development - Enables the development of high-performance Python modules written in C++.
  • Script-to-Native Type Mappings - Uses C++ templates to automatically map native type signatures to corresponding Python object wrappers.
  • C-Bindings - Provides the binding layer that connects C++ types and functions to the Python environment.
  • Cross-Language Memory Managers - Manages memory across the C++/Python boundary to prevent leaks and ensure type safety.
  • Python-C Interfaces - Provides the low-level interface layer that maps Python calls to C++ native routines.
  • C++ Language Bridges - Acts as a comprehensive bridge for mapping C++ types, inheritance, and lambdas into Python.
  • Standard Library Mappings - Translates C++ standard library data structures and smart pointers into compatible Python types.
  • Reference Counting - Synchronizes C++ smart pointers with Python's reference counting to manage cross-language object lifetimes.
  • C++ Bindings - Provides robust bindings for interoperability between C++ types and the Python runtime.
  • Native Library Integrations - Wraps existing C++ libraries to make their functionality available as callable Python objects.
  • Buffer-Protocol Array Integration - Implements the Python buffer protocol to share memory between C++ and NumPy arrays without copying.
  • NumPy Array Integration - Binds native C++ data to NumPy arrays using buffer protocols to avoid memory copying.
  • Header-Only Libraries - Implemented as a header-only library to simplify integration without requiring pre-compiled binaries.
  • Lambda Bindings - Allows C++ lambda functions with captured variables to be called from Python.
  • High-Performance Scientific Computing - Facilitates high-performance numerical computing by integrating native C++ data with NumPy arrays.
  • NumPy-Compatible Frameworks - Provides a bridge that makes native C++ data fully compatible with NumPy frameworks.
  • Compile-Time Metaprogramming - Utilizes compile-time metaprogramming to automatically register C++ functions and classes into the Python runtime.
  • 开发者工具 - Operability between C++ and Python
  • 开发环境 - Seamless interoperability between C++ and Python.
  • Language Bindings - Seamless interoperability between C++ and Python.
  • Language Interop - Seamless interoperability between C++ and Python.
  • Scripting and Bindings - Seamless interoperability between C++11 and Python.
  • Scripting and Interop - Seamless interoperability between C++ and Python.

Star 历史

pybind/pybind11 的 Star 历史图表pybind/pybind11 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Pybind11 的开源替代方案

相似的开源项目,按与 Pybind11 的功能重合度排序。
  • cython/cythoncython 的头像

    cython/cython

    10,767在 GitHub 上查看↗

    Cython is a compiler that translates Python code into C or C++ to create high-performance extension modules. It functions as a static typing optimizer and a C extension generator, allowing developers to declare C types within Python code to reduce interpreter overhead and increase execution speed. The project enables the wrapping of external C libraries to provide high-level interfaces to low-level system capabilities. It also serves as a native binary packager, capable of freezing scripts and their dependencies into standalone executable binaries for distribution. The system covers a broad

    Cythonbig-dataccpp
    在 GitHub 上查看↗10,767
  • swig/swigswig 的头像

    swig/swig

    6,294在 GitHub 上查看↗

    SWIG is a tool that generates wrapper code to expose C and C++ libraries to a wide range of higher-level programming languages. It reads annotated C/C++ header files and produces language-specific bindings from a single interface definition, supporting languages such as Python, Java, Ruby, C#, Perl, and many others. The generated wrapper code is free from the project's GPL license, allowing users to distribute it under their own terms. The tool handles modern C++ features including templates, namespaces, smart pointers, and constructs up to C++20 through specialized parsing and code generatio

    SWIG
    在 GitHub 上查看↗6,294
  • thephd/sol2ThePhD 的头像

    ThePhD/sol2

    5,072在 GitHub 上查看↗

    Sol2 is a C++ Lua binding library that serves as a language interoperability layer for integrating Lua scripts into C++ applications. It acts as a scripting wrapper and API toolkit, enabling the execution of Lua code and the management of shared state within a native C++ environment. The library focuses on automated function and type mapping to bridge native C++ classes and complex data types with the Lua scripting engine. It provides mechanisms for bidirectional data exchange, allowing compiled logic and variables to be synchronized between the host application and the script runtime. The s

    C++
    在 GitHub 上查看↗5,072
  • cupy/cupycupy 的头像

    cupy/cupy

    11,000在 GitHub 上查看↗

    CuPy is a CUDA array computing library that implements a NumPy-compatible interface for executing array operations and numerical computing on NVIDIA GPUs. It serves as a GPU-accelerated numerical library and a CUDA-based SciPy implementation, offloading heavy calculations to graphics hardware to increase processing speed for scientific and engineering workloads. The library enables multi-framework tensor exchange, allowing data buffers to be shared between different deep learning frameworks using standardized memory layouts to avoid memory copies. It also supports custom GPU kernel integratio

    Python
    在 GitHub 上查看↗11,000
查看 Pybind11 的所有 30 个替代方案→

常见问题解答

pybind/pybind11 是做什么的?

pybind11 is a header-only C++ binding library that exposes C++ functions and classes as Python modules. It serves as a language bridge, mapping native types, inheritance hierarchies, and lambda functions into compatible Python objects to enable high-performance native code execution.

pybind/pybind11 的主要功能有哪些?

pybind/pybind11 的主要功能包括:C++ Extension Development, Script-to-Native Type Mappings, C-Bindings, Cross-Language Memory Managers, Python-C Interfaces, C++ Language Bridges, Standard Library Mappings, Reference Counting。

pybind/pybind11 有哪些开源替代品?

pybind/pybind11 的开源替代品包括: cython/cython — Cython is a compiler that translates Python code into C or C++ to create high-performance extension modules. It… swig/swig — SWIG is a tool that generates wrapper code to expose C and C++ libraries to a wide range of higher-level programming… thephd/sol2 — Sol2 is a C++ Lua binding library that serves as a language interoperability layer for integrating Lua scripts into… cupy/cupy — CuPy is a CUDA array computing library that implements a NumPy-compatible interface for executing array operations and… xtensor-stack/xtensor — xtensor is a C++ multidimensional array library for numerical computing that provides N-dimensional containers with an… bytedeco/javacpp — JavaCPP is a JNI C++ bridge and foreign function interface that provides a binding generator, a native library loader,…