Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we get an FFI for Python? #97

Open
winstxnhdw opened this issue Oct 29, 2024 · 2 comments · May be fixed by #108
Open

Can we get an FFI for Python? #97

winstxnhdw opened this issue Oct 29, 2024 · 2 comments · May be fixed by #108

Comments

@winstxnhdw
Copy link

Happy to contribute, of course.

@ogxd
Copy link
Owner

ogxd commented Nov 5, 2024

Hello @winstxnhdw

Here there are signatures to FFI methods (I used these to benchmark GxHash against well-known C hash functions):
https://github.com/ogxd/gxhash/blob/main/ffi/src/lib.rs

I'm not super familiar with FFI for Python. From what I recall there are several approaches (Cython?) but my knowledge may be out-of-date. In any case, I don't think it would be very different considering that these FFI signatures are quite simple, but I don't think I would include any Python-related things into this repository. It would make more sense to do it in a separate repository (that you can make and maintain if you want, it's MIT licensed so you're 100% free to do whatever you want with it)

@winstxnhdw
Copy link
Author

Hey, I don’t mind doing it in my own repository but considering you already have a C FFI in this repository, I thought it would be more consistent to have a Python one as well. If you’re worried about having Python code in the repository, worry not as Python bindings can be written in entirely Rust with PyO3 https://github.com/PyO3/pyo3

@winstxnhdw winstxnhdw linked a pull request Nov 14, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants