-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Python bindings to facilitate PyCasbin-on-CPP #84
Comments
Yes, this is our plan. |
@Zxilly I tried to make a boilerplate for the workflow to make these bindings and management of pybind11 module with CMake. Is it somewhat similar to what you envisioned for this? |
|
Good work. |
@EmperorYP7 I don't know the detailed Py-Cpp binding techniques, but we want:
|
@hsluoyz yes, the bindings will be cross-platform. The performance will be similar to the resultant of |
Sure. But I think I should research it a bit more before diving in. |
@EmperorYP7 does pybind11 require CMake? I think we are not using CMake in this repo now? I remembered we are using .sln for Windows MSVC and makefile for Linux, the repo doesn't even build for macOS yet. How to resolve this? |
Not necessarily, but it's the best way to get it done. Details: https://pybind11.readthedocs.io/en/stable/compiling.html
The project currently supports building the casbin library through CMake.
It does through CMake. But not reliably. @hsluoyz I am willing to work on an easy-to-maintain build system based on CMake. This would also include |
lgtm! |
@EmperorYP7 can you share what parts are still missing to make PyCasbin-on-CPP work? Maybe @sheny1xuan and @noob20000405 can continue the work. Should we open this issue again or raise a new issue to track the progress? |
I completely missed this one!
|
@EmperorYP7 great! Created two issues: |
The project has the potential to utilize its C++ API for PyCasbin-on-CPP through Python bindings which will allow us to call C++ code from Python. CPython exposes various endpoints for us to make bindings, but this approach will be cumbersome and vulnerable to a lot of errors and memory leaks which won't be easy to debug. pybind11 can be used for making Python bindings and modules with C++11 as it is based on
Boost::Python
library.The text was updated successfully, but these errors were encountered: