nanobind
Nuitka
nanobind | Nuitka | |
---|---|---|
11 | 101 | |
2,397 | 12,157 | |
- | 2.0% | |
9.5 | 10.0 | |
9 days ago | 2 days ago | |
C++ | Python | |
BSD 3-clause "New" or "Revised" License | Apache License 2.0 |
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.
nanobind
-
Progress on No-GIL CPython
Take a look at https://github.com/wjakob/nanobind
> More concretely, benchmarks show up to ~4× faster compile time, ~5× smaller binaries, and ~10× lower runtime overheads compared to pybind11.
-
Advanced Python Mastery – A Course by David Beazley
People should not take that an endorsement of Swig.
Please use ctypes, cffi or https://github.com/wjakob/nanobind
Beazley himself is amazed that it (Swig) is still in use.
- Swig – Connect C/C++ programs with high-level programming languages
- Nanobind: Tiny and efficient C++/Python bindings
-
Create Python bindings for my C++ code with PyBind11
Nanobind made by the creator of PyBind11, it has a similar interface, but it takes leverage of C++17 and it aims to have more efficient bindings in space and speed.
- Nanobind – Seamless operability between C++17 and Python
-
Cython Is 20
I would recommend using NanoBind, the follow up of PyBind11 by the same author (Wensel Jakob), and move as much performance critical code to C or C++. https://github.com/wjakob/nanobind
If you really care about performance called from Python, consider something like NVIDIA Warp (Preview). Warp jits and runs your code on CUDA or CPU. Although Warp targets physics simulation, geometry processing, and procedural animation, it can be used for other tasks as well. https://github.com/NVIDIA/warp
Jax is another option, by Google, jitting and vectorizing code for TPU, GPU or CPU. https://github.com/google/jax
- GitHub - wjakob/nanobind: nanobind — Seamless operability between C++17 and Python
Nuitka
- Nuitka the Python Compiler
- Nuitka: Optimizing Python compiler compatible with CPython
- Nuitka Is a Python Compiler
-
Cosmopolitan v3.5.0
You can probably generate C code from Python now with Nuitka and pump that into this Cosmopolitan tool, today, to get that?
https://nuitka.net/
-
Ruby: A great language for shell scripts
You could try Nuitka [1], but I don't have enough experience with it to say if it's any less brittle than PyInstaller.
[1]: https://nuitka.net/
- Nvidia Warp: A Python framework for high performance GPU simulation and graphics
-
PyPy has been working for me for several years now
Nuitka is actively maintained and support for 2.6 and 2.7. It is the work of a single guy, and I have never used it, so I don't know much about it.
https://nuitka.net/
-
Py2wasm – A Python to WASM Compiler
Thanks for the feedback! I'm Syrus, main author of the work on py2wasm.
We already opened a PR into Nuitka to bring the relevant changes upstream: https://github.com/Nuitka/Nuitka/pull/2814
We envision py2wasm being a thin layer on top of Nuitka, as also commented in the article.
From what we gathered, we believe that there's usefulness on having py2wasm as a separate package, as py2wasm would also need to ship the precompiled Python distribution (3.11) for WASI (which will not be needed for the other Nuitka use cases), apart of also shipping other tools that are not directly relevant for Nuitka
-
Python Is Portable
This is a good place to mention https://nuitka.net/ which aims to compile python programs into standalone binaries.
-
We are under DDoS attack and we do nothing
For Python, you could make a proper deployment binary using Nuitka (in standalone mode – avoid onefile mode for this). I'm not pretending it's as easy as building a Go executable: you may have to do some manual hacking for more unusual unusual packages, and I don't think you can cross compile. I think a key element you're getting at is that Go executables have very few dependencies on OS packages, but with Python (once you've sorted the actual Python dependencies) you only need the packages used for manylinux [2], which is not too onerous.
[1] https://nuitka.net/
[2] https://peps.python.org/pep-0599/#the-manylinux2014-policy
What are some alternatives?
pybind11 - Seamless operability between C++11 and Python
PyInstaller - Freeze (package) Python programs into stand-alone executables
awesome-cython - A curated list of awesome Cython resources. Just a draft for now.
pyarmor - A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
avendish - declarative polyamorous cross-system intermedia objects
PyOxidizer - A modern Python application packaging and distribution tool
matplotlibcpp17 - Alternative to matplotlibcpp with better syntax, based on pybind
py2exe - modified py2exe to support unicode paths
epython - EPython is a typed-subset of the Python for extending the language new builtin types and methods
false-positive-malware-reporting - Trying to release your software sucks, mostly because of antivirus false positives. I don't have an answer, but I do have a list of links to help get your code whitelisted.
warp - A Python framework for high performance GPU simulation and graphics
py2app