Skip to content

python <> rust bindings need zero-copy #16

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

Open
verbiiyo opened this issue Apr 5, 2025 · 0 comments
Open

python <> rust bindings need zero-copy #16

verbiiyo opened this issue Apr 5, 2025 · 0 comments

Comments

@verbiiyo
Copy link
Contributor

verbiiyo commented Apr 5, 2025

For any good binding support, we really want to have the frames being passed from ticks between python and xos to be zero-copy. however, after about 3-4 hours of tinkering today, I wasn't able to get #15 to have true zero-copy.

we got very close with the state.frame.buffer conceptual refactor, which is great because now all rust-defined applications benefit from zero-copies (an example of it can be found here in the ball code)

but yeah, rust is having to copy the buffer returned from python into the state.frame.buffer, because every time i try to get python to just simply write directly to the rust buffer, i'm met with a blank screen.

the ideal case is that python would simply modify the buffer in-place without needing to return it like so.

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