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

Backlog: Support streaming #14

Closed
wants to merge 1 commit into from
Closed

Backlog: Support streaming #14

wants to merge 1 commit into from

Conversation

milesgranger
Copy link
Owner

No description provided.

@milesgranger milesgranger changed the title Support streaming Backlog: Support streaming Jul 27, 2020
@milesgranger
Copy link
Owner Author

Putting this on the back-burner until it's desired to have by someone.

Because pyO3 does not have a native representation of a file-like object from Python's cffi, it requires multiple calls into Python from Rust which ends up having a significantly slower performance compared to other alternatives.

@martindurant
Copy link

This was a cool request - is there an issue on py03 tracking it? In fact, I don't see how to use pyo3 to call the python C API at all, but I suppose you can just declare it as an external library?

@milesgranger
Copy link
Owner Author

milesgranger commented Feb 13, 2021

I was mainly looking at this issue: PyO3/pyo3#933, but haven't gotten back to playing with this. Possible maybe to implement a buffer protocol in a Rust type that Python can have ownership of. 🤔 But so far as

with open(...) f: 
    sweet_rust_function(f)

doesn't seem like an option right now, unless I misunderstand. But again, will have to look at it in more depth.

@milesgranger
Copy link
Owner Author

closing in favor of #45

@milesgranger milesgranger deleted the stream-api branch March 10, 2021 21:58
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 this pull request may close these issues.

2 participants