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

Python: impl FromPyObject for reliable FFI #47

Closed
kylebarron opened this issue Apr 1, 2024 · 3 comments
Closed

Python: impl FromPyObject for reliable FFI #47

kylebarron opened this issue Apr 1, 2024 · 3 comments

Comments

@kylebarron
Copy link
Owner

I feel like I'd want to expose the buffer protocol on our classes, so that we could call memoryview on any user input and interpret it the same whether it's one of our classes or a plain bytes object. In this case, we might also want to move to top-level functions instead of class methods?

@kylebarron
Copy link
Owner Author

We should check if py.extract<Vec<u8>> works

@kylebarron
Copy link
Owner Author

We should probably implement FromPyObject on the main index class, but also potentially have a separate "view" class, not exported to Python, so that we can use a python buffer without copying it

@kylebarron
Copy link
Owner Author

Closed by #55

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

No branches or pull requests

1 participant