pybind11 VS ndk

Compare pybind11 vs ndk and see what are their differences.

pybind11

Seamless operability between C++11 and Python (by pybind)

ndk

The Android Native Development Kit (by android)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
pybind11 ndk
42 14
14,626 1,864
1.8% 2.0%
8.7 4.2
7 days ago about 2 months ago
C++
GNU General Public License v3.0 or later -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

pybind11

Posts with mentions or reviews of pybind11. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-06.

ndk

Posts with mentions or reviews of ndk. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-09.
  • CheerpJ 3.0: a JVM replacement in HTML5 and WASM to run Java on modern browsers
    13 projects | news.ycombinator.com | 9 May 2023
    Android folks are thinking about using WASM for NDK, with compilation to native code on the PlayStore.

    https://github.com/android/ndk/issues/1771

  • New Rust course by Android: Comprehensive Rust 🦀
    7 projects | /r/rust | 21 Dec 2022
    We have looked into what work would be required to support Rust in the NDK, but even if we did it (which is not certain!) it's a lot of work. Today, we're mainly investing in the lower-level work (compiler changes for some of the complexity around linkage on android, etc.). Feel free to follow along / make suggestions here: https://github.com/android/ndk/issues/1742
  • Ocrmypdf stopped working in termux with python 3.10
    3 projects | /r/termux | 30 Aug 2022
    If it used to work then you probably just need to reinstall(/recompile) it with something like pip3 install ocrmypdf --force. Most likely issue happens because some library it links against had a major upgrade, which caused the mentioned symbol to disappear (could also be a variant of https://github.com/android/ndk/issues/1614, but seems unlikely)
  • Ask HN: Pros and Cons of Switching from Linux to M1 MacBook in 2022
    2 projects | news.ycombinator.com | 13 May 2022
    I have an M1. I compile Android apps in Android Studio a lot. For a small Android app without many bells and whistles M1 compiles fast (even faster than my Ubuntu laptop). However some Android apps I compile have some C/C++ code compiled with the NDK and accessed via JNI - and which now have to compile on an ARM chip - and that is a rigmarole currently ( https://github.com/android/ndk/issues/1299 ) to the extent that I am just sticking with Ubuntu on x86-64 until ARM is fully supported in Android Studio full release (not some alpha/canary version).

    Also, I have never used the MacOS Active Trader Pro app, but I downloaded it to my M1 and it did not work, and online old Macbook users say it works and people with M1s say it has problems on M1.

    So my experience is look to see what apps support M1 and ARM. I can tell you that Rosetta does not work for everything.

    Apps were not working, and I put Rosetta in, and now some apps work and some don't. So this is another thing to look into.

  • Linux Developer Laptops: Dell's Precision 5500 series reigns supreme
    3 projects | news.ycombinator.com | 11 Mar 2022
    > And ARM compatibility issues not really helping

    There were two things I wanted to try on my MBP w/ M1 - compiling an Android app that has some C code, and also to run Fidelity's Active Trader Pro program (not that I would use it that actively). I also installed the Rosetta stuff it prompted for.

    The Active Trader Pro program would not run.

    In Android Studio, the production version can not compile with CMake as it can on Intel-based Macs yet ( https://github.com/android/ndk/issues/1299 ). They say there is stuff in the beta/alpha/canary branches where it is working, but I am not in a rush and will wait for that to make its way into production.

    > It’s good, fast

    Yes, I did see the speed, especially with a normal Kotlin/Java Android Studio compile, on 16GB RAM.

  • CANNOT LINK EXECUTABLE "findimagedupes"
    2 projects | /r/termux | 22 Feb 2022
    Could you open an issue at github.com/termux/termux-packages? Miiight be a variant of https://github.com/android/ndk/issues/1614, but we haven't seen that for golang packages before
  • Anyone tried the M1 Pro/Max with AS yet?
    2 projects | /r/androiddev | 27 Oct 2021
    NDK development is not supported, but my understanding is that everything else is good to go.
  • C++ Weekly - Ep 270 - Break ABI to Save C++
    2 projects | /r/cpp | 4 May 2021

What are some alternatives?

When comparing pybind11 and ndk you can also consider the following projects:

PyO3 - Rust bindings for the Python interpreter

nanobind - nanobind: tiny and efficient C++/Python bindings

Optional Argument in C++ - Named Optional Arguments in C++17

setuptools-rust - Setuptools plugin for Rust support

PEGTL - Parsing Expression Grammar Template Library

sol2 - Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:

sparsehash - C++ associative containers

py2many - Transpiler of Python to many other languages

dynamic_bitset - Simple Useful Libraries: C++17/20 header-only dynamic bitset

wasmtime - A fast and secure runtime for WebAssembly

cpp-subprocess - Subprocessing with modern C++

LSHBOX - A c++ toolbox of locality-sensitive hashing (LSH), provides several popular LSH algorithms, also support python and matlab.