[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-11703":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},11703,"pybind11","pybind\u002Fpybind11","pybind","Seamless operability between C++11 and Python",null,"https:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11","C++",17898,2307,248,593,0,3,15,50,9,45,false,"main",[25,26],"python","bindings","2026-06-12 02:02:33",".. figure:: https:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11\u002Fraw\u002Fmaster\u002Fdocs\u002Fpybind11-logo.png\n   :alt: pybind11 logo\n\n**pybind11 (v3)  — Seamless interoperability between C++ and Python**\n\n|Latest Documentation Status| |Stable Documentation Status| |Gitter chat| |GitHub Discussions|\n\n|CI| |Build status| |SPEC 4 — Using and Creating Nightly Wheels|\n\n|Repology| |PyPI package| |Conda-forge| |Python Versions|\n\n`Setuptools example \u003Chttps:\u002F\u002Fgithub.com\u002Fpybind\u002Fpython_example>`_\n• `Scikit-build example \u003Chttps:\u002F\u002Fgithub.com\u002Fpybind\u002Fscikit_build_example>`_\n• `CMake example \u003Chttps:\u002F\u002Fgithub.com\u002Fpybind\u002Fcmake_example>`_\n\n.. start\n\n\n**pybind11** is a lightweight header-only library that exposes C++ types\nin Python and vice versa, mainly to create Python bindings of existing\nC++ code. Its goals and syntax are similar to the excellent\n`Boost.Python \u003Chttp:\u002F\u002Fwww.boost.org\u002Fdoc\u002Flibs\u002F1_58_0\u002Flibs\u002Fpython\u002Fdoc\u002F>`_\nlibrary by David Abrahams: to minimize boilerplate code in traditional\nextension modules by inferring type information using compile-time\nintrospection.\n\nThe main issue with Boost.Python—and the reason for creating such a\nsimilar project—is Boost. Boost is an enormously large and complex suite\nof utility libraries that works with almost every C++ compiler in\nexistence. This compatibility has its cost: arcane template tricks and\nworkarounds are necessary to support the oldest and buggiest of compiler\nspecimens. Now that C++11-compatible compilers are widely available,\nthis heavy machinery has become an excessively large and unnecessary\ndependency.\n\nThink of this library as a tiny self-contained version of Boost.Python\nwith everything stripped away that isn't relevant for binding\ngeneration. Without comments, the core header files only require ~4K\nlines of code and depend on Python (CPython 3.8+, PyPy, or GraalPy) and the C++\nstandard library. This compact implementation was possible thanks to some C++11\nlanguage features (specifically: tuples, lambda functions and variadic\ntemplates). Since its creation, this library has grown beyond Boost.Python in\nmany ways, leading to dramatically simpler binding code in many common\nsituations.\n\nTutorial and reference documentation is provided at\n`pybind11.readthedocs.io \u003Chttps:\u002F\u002Fpybind11.readthedocs.io\u002Fen\u002Flatest>`_.\nA PDF version of the manual is available\n`here \u003Chttps:\u002F\u002Fpybind11.readthedocs.io\u002F_\u002Fdownloads\u002Fen\u002Flatest\u002Fpdf\u002F>`_.\nAnd the source code is always available at\n`github.com\u002Fpybind\u002Fpybind11 \u003Chttps:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11>`_.\n\n\nCore features\n-------------\n\n\npybind11 can map the following core C++ features to Python:\n\n- Functions accepting and returning custom data structures per value,\n  reference, or pointer\n- Instance methods and static methods\n- Overloaded functions\n- Instance attributes and static attributes\n- Arbitrary exception types\n- Enumerations\n- Callbacks\n- Iterators and ranges\n- Custom operators\n- Single and multiple inheritance\n- STL data structures\n- Smart pointers with reference counting like ``std::shared_ptr``\n- Internal references with correct reference counting\n- C++ classes with virtual (and pure virtual) methods can be extended\n  in Python\n- Integrated NumPy support (NumPy 2 requires pybind11 2.12+)\n\nGoodies\n-------\n\nIn addition to the core functionality, pybind11 provides some extra\ngoodies:\n\n- CPython 3.8+, PyPy3 7.3.17+, and GraalPy 24.1+ are supported with an\n  implementation-agnostic interface (see older versions for older CPython\n  and PyPy versions).\n\n- It is possible to bind C++11 lambda functions with captured\n  variables. The lambda capture data is stored inside the resulting\n  Python function object.\n\n- pybind11 uses C++11 move constructors and move assignment operators\n  whenever possible to efficiently transfer custom data types.\n\n- It's easy to expose the internal storage of custom data types through\n  Pythons' buffer protocols. This is handy e.g. for fast conversion\n  between C++ matrix classes like Eigen and NumPy without expensive\n  copy operations.\n\n- pybind11 can automatically vectorize functions so that they are\n  transparently applied to all entries of one or more NumPy array\n  arguments.\n\n- Python's slice-based access and assignment operations can be\n  supported with just a few lines of code.\n\n- Everything is contained in just a few header files; there is no need\n  to link against any additional libraries.\n\n- Binaries are generally smaller by a factor of at least 2 compared to\n  equivalent bindings generated by Boost.Python. A recent pybind11\n  conversion of PyRosetta, an enormous Boost.Python binding project,\n  `reported \u003Chttps:\u002F\u002Fgraylab.jhu.edu\u002FSergey\u002F2016.RosettaCon\u002FPyRosetta-4.pdf>`_\n  a binary size reduction of **5.4x** and compile time reduction by\n  **5.8x**.\n\n- Function signatures are precomputed at compile time (using\n  ``constexpr``), leading to smaller binaries.\n\n- With little extra effort, C++ types can be pickled and unpickled\n  similar to regular Python objects.\n\nSupported platforms & compilers\n-------------------------------\n\npybind11 is exercised in continuous integration across a range of operating\nsystems, Python versions, C++ standards, and toolchains. For an up-to-date\nview of the combinations we currently test, please see the\n`pybind11 GitHub Actions \u003Chttps:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11\u002Factions?query=branch%3Amaster>`_\nlogs.\n\nThe test matrix naturally evolves over time as older platforms and compilers\nfall out of use and new ones are added by the community. Closely related\nversions of a tested compiler or platform will often work as well in practice,\nbut we cannot promise to validate every possible combination. If a\nconfiguration you rely on is missing from the matrix or regresses, issues and\npull requests to extend coverage are very welcome. At the same time, we need\nto balance the size of the test matrix with the available CI resources,\nsuch as GitHub's limits on concurrent jobs under the free tier.\n\nAbout\n-----\n\nThis project was created by `Wenzel\nJakob \u003Chttp:\u002F\u002Frgl.epfl.ch\u002Fpeople\u002Fwjakob>`_. Significant features and\u002For\nimprovements to the code were contributed by\nJonas Adler,\nLori A. Burns,\nSylvain Corlay,\nEric Cousineau,\nAaron Gokaslan,\nRalf Grosse-Kunstleve,\nTrent Houliston,\nAxel Huebl,\n@hulucc,\nYannick Jadoul,\nSergey Lyskov,\nJohan Mabille,\nTomasz Miąsko,\nDean Moldovan,\nBen Pritchard,\nJason Rhinelander,\nBoris Schäling,\nPim Schellart,\nHenry Schreiner,\nIvan Smirnov,\nDustin Spicuzza,\nBoris Staletic,\nEthan Steinberg,\nPatrick Stewart,\nIvor Wanders,\nand\nXiaofei Wang.\n\nWe thank Google for a generous financial contribution to the continuous\nintegration infrastructure used by this project.\n\n\nContributing\n~~~~~~~~~~~~\n\nSee the `contributing\nguide \u003Chttps:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.md>`_\nfor information on building and contributing to pybind11.\n\nLicense\n~~~~~~~\n\npybind11 is provided under a BSD-style license that can be found in the\n`LICENSE \u003Chttps:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11\u002Fblob\u002Fmaster\u002FLICENSE>`_\nfile. By using, distributing, or contributing to this project, you agree\nto the terms and conditions of this license.\n\n.. |Latest Documentation Status| image:: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fpybind11\u002Fbadge?version=latest\n   :target: http:\u002F\u002Fpybind11.readthedocs.org\u002Fen\u002Flatest\n.. |Stable Documentation Status| image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-stable-blue.svg\n   :target: http:\u002F\u002Fpybind11.readthedocs.org\u002Fen\u002Fstable\n.. |Gitter chat| image:: https:\u002F\u002Fimg.shields.io\u002Fgitter\u002Froom\u002FgitterHQ\u002Fgitter.svg\n   :target: https:\u002F\u002Fgitter.im\u002Fpybind\u002FLobby\n.. |CI| image:: https:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11\u002Fworkflows\u002FCI\u002Fbadge.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11\u002Factions\n.. |Build status| image:: https:\u002F\u002Fci.appveyor.com\u002Fapi\u002Fprojects\u002Fstatus\u002Friaj54pn4h08xy40?svg=true\n   :target: https:\u002F\u002Fci.appveyor.com\u002Fproject\u002Fwjakob\u002Fpybind11\n.. |PyPI package| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpybind11.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpybind11\u002F\n.. |Conda-forge| image:: https:\u002F\u002Fimg.shields.io\u002Fconda\u002Fvn\u002Fconda-forge\u002Fpybind11.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fconda-forge\u002Fpybind11-feedstock\n.. |Repology| image:: https:\u002F\u002Frepology.org\u002Fbadge\u002Flatest-versions\u002Fpython:pybind11.svg\n   :target: https:\u002F\u002Frepology.org\u002Fproject\u002Fpython:pybind11\u002Fversions\n.. |Python Versions| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpybind11.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpybind11\u002F\n.. |GitHub Discussions| image:: https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=Discussions&message=Ask&color=blue&logo=github\n   :target: https:\u002F\u002Fgithub.com\u002Fpybind\u002Fpybind11\u002Fdiscussions\n.. |SPEC 4 — Using and Creating Nightly Wheels| image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSPEC-4-green?labelColor=%23004811&color=%235CA038\n   :target: https:\u002F\u002Fscientific-python.org\u002Fspecs\u002Fspec-0004\u002F\n","pybind11 是一个轻量级的头文件库，旨在实现C++和Python之间的无缝互操作性。它主要用于将现有的C++代码转换为Python绑定，支持函数、实例方法、静态方法、重载函数、属性、异常类型、枚举、回调、迭代器、自定义运算符、继承关系及STL数据结构等多种核心C++特性到Python的映射。该库利用了C++11的新特性如元组、lambda函数和可变参数模板等，使得绑定代码更加简洁高效。相比Boost.Python，pybind11去除了不必要的复杂依赖，仅需约4K行代码即可完成核心功能。适用于需要在高性能C++应用中使用Python接口或希望在Python环境中调用C++代码的场景。",2,"2026-06-11 03:32:21","trending"]