What’s the best and safest way to compile Python code into a DLL?
Hi everyone,
I have a full Python application that I’d like to compile into a DLL so it can be integrated and used from another application on Windows. My main goal is to make distribution easier while also protecting the source code as much as possible and keeping good performance and stability.
I’ve been looking into options like Cython, Nuitka, pybind11, and embedding Python, but I’m still not sure what the best real-world approach is for converting an entire project instead of just a small module.
Is there any method that is considered significantly safer or harder to reverse engineer? Or is Python code inside a DLL still relatively easy to extract? I’m also wondering if people usually end up rewriting the whole project in C/C++ when they need a truly secure DLL.
I’d really appreciate recommendations or advice from anyone who has done this before.