Hacker GitHub

← All repos

pybind/pybind11

View on GitHub ↗ ★ 18,026 C++

Seamless operability between C++11 and Python

25 mentions on Hacker News by 20 people: 4 stories, 21 comments · first 2016-04-23 · latest 2026-02-22

Mentions per year 25 mentions · busiest year 2017 (9)
20082026
  1. For C++, don't use SWIG, use this: https://github.com/pybind/pybind11
  2. …expose it to Python (so no copying overhead and you can create nice cache-aware structs, etc.). [1] https://github.com/pybind/pybind11/blob/master/tests/test_py... [2] https://gitlab.unistra.fr/benzerara/pybind11/-/tree/master/e...
  3. …or NumpyEigen [2]. I find tools like numba and cython to be more trouble than they're worth. [1] https://github.com/pybind/pybind11 [2] https://github.com/fwilliams/numpyeigen
    comment by fwilliams · 2022-12-27 · in Numba: A High Performance Python Compiler
  4. …like python bindings territory. Nowhere near something like pybind11 [0] for c++ bindings yet. [0] https://github.com/pybind/pybind11 [1] https://github.com/mozilla/uniffi-rs
  5. This was not my information at the time. But thanks for the info, it is helpful. With https://github.com/pybind/pybind11 there is really great integration with C++ and Python is my second home after C++ actually. Anyway, I am quite happy…
  6. …Python. The experience was very much like using Boost Python (whcih these days has alternative with https://github.com/pybind/pybind11 ). It's _really_ easy to wrap code for Python, and it has nice APIs to ensure GIL is held. Being Rust,…
  7. You can look at the pybind11 ( https://github.com/pybind/pybind11 ) codebase. It is a library for generating python bindings for C++ code. It uses latest C++17 and does quite a lot of template metaprogramming to generate the bindings.
    comment by in42 · 2020-10-28 · in Ask HN: Good C++ code bases to read?
  8. …one am pretty excited about diving into the code. [1] https://github.com/mitsuba-renderer/enoki [2] https://github.com/pybind/pybind11 [3] https://dl.acm.org/doi/10.1145/3355089.3356498
  9. How does CLIF compare to PyBind11[1]? [1] https://github.com/pybind/pybind11
    comment by MereInterest · 2019-07-11 · in Racket Is an Acceptable Python
  10. …slower parts to C++11 using pybind11. Bonus point: You can use all the existing C/C++ libraries. https://github.com/pybind/pybind11
    comment by mlboss · 2019-02-15 · in Moving from Ruby to Rust
  11. …code and overhead in my experience. cffi isn’t bad, but it’s not as flexible/expressive. [0] https://github.com/pybind/pybind11
    comment by stochastic_monk · 2019-02-02 · in A Python Interpreter Written in Rust
  12. …Although I use SWIG on my job, pybind11[0] is a nice alternative that I've been looking at. [0] https://github.com/pybind/pybind11
  13. …days ([1]) -- thanks to libraries like pybind11 [2]. [1] https://github.com/aldanor/ipybind [2] https://github.com/pybind/pybind11
    comment by aldanor · 2018-02-07 · in Python’s Weak Performance Matters
  14. …are immediately available. Been using it myself quite a lot for prototyping C++/Python code. [1] https://github.com/pybind/pybind11
  15. ….def("addh_", &hll_t::addh, "Hash an integer value and then add that to the sketch."); } [1] https://github.com/pybind/pybind11
    comment by stochastic_monk · 2017-11-17 · in Speed up your Python using Rust
  16. pybind11 is the nicest foreign function interface I've encountered: https://github.com/pybind/pybind11
  17. pybind11 is a similar library, but for interfacing with C++ from Python: https://github.com/pybind/pybind11
    comment by Cieplak · 2017-07-27 · in PyO3: Python Rust binding
  18. …production -- ETH Zurich puts out some great code [1,2]. [1] https://github.com/libigl/libigl [2] https://github.com/pybind/pybind11
  19. …doesn't scale and debugging is a total nightmare. Disclaimer: I'm a contributor to pybind11. [1] https://github.com/pybind/pybind11
    comment by aldanor · 2017-05-27 · in Coroutines are now in Clang trunk, libc++
  20. …project. It still looks like manually written C extension modules to me based off of what I see in https://github.com/pybind/pybind11/blob/master/docs/basics.r... . Just much shorter code with a lot of the hard to get right details taken…
    comment by gpshead · 2017-05-03 · in C++ Language Interface Foundation (CLIF)
  21. …personally, there're real reasons not to use it -- e.g., no support for structured/record arrays: https://github.com/pybind/pybind11/issues/67