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

Binary serialization over pipes #471

Closed
pvdrz opened this issue Jun 19, 2023 · 0 comments · Fixed by #741
Closed

Binary serialization over pipes #471

pvdrz opened this issue Jun 19, 2023 · 0 comments · Fixed by #741
Assignees

Comments

@pvdrz
Copy link
Collaborator

pvdrz commented Jun 19, 2023

This binary serialization over a pipe comes up in other places. perhaps a bit of abstraction could help with the buffer sizes and ser/de steps, e.g. Pipe<T: BinSerDe>, impl BinSerDef for i32 { const NUM_BYTES: usize = 4; /* .. */, Pipe::write(val: &T), Pipe::read() -> io::Result<T>, etc.

Originally posted by @japaric in #468 (comment)

@pvdrz pvdrz self-assigned this Jun 19, 2023
xy2i added a commit to xy2i/sudo-rs that referenced this issue Aug 25, 2023
We use `UnixStream::pair()` a few times and reimplement binary ser/de
each time. Add an abstraction that does the serde (`BinSerDe`) and buffer
ceremony (`BinPipe`) for us.

Fixes trifectatechfoundation#471.
xy2i added a commit to xy2i/sudo-rs that referenced this issue Aug 29, 2023
We use `UnixStream::pair()` a few times and reimplement binary ser/de
each time. Add an abstraction that does the serde (`BinSerDe`) and buffer
ceremony (`BinPipe`) for us.

Fixes trifectatechfoundation#471.
xy2i added a commit to xy2i/sudo-rs that referenced this issue Aug 30, 2023
We use `UnixStream::pair()` a few times and reimplement binary ser/de
each time. Add an abstraction that does the serde (`BinSerDe`) and buffer
ceremony (`BinPipe`) for us.

Fixes trifectatechfoundation#471.
xy2i added a commit to xy2i/sudo-rs that referenced this issue Sep 5, 2023
We use `UnixStream::pair()` a few times and reimplement binary ser/de
each time. Add an abstraction that does the serde (`BinSerDe`) and buffer
ceremony (`BinPipe`) for us.

Fixes trifectatechfoundation#471.
xy2i added a commit to xy2i/sudo-rs that referenced this issue Sep 7, 2023
We use `UnixStream::pair()` a few times and reimplement binary ser/de
each time. Add an abstraction that does the serde steps (`DeSerialize`) and
buffer ceremony (`BinPipe`) for us.

Fixes trifectatechfoundation#471.
xy2i added a commit to xy2i/sudo-rs that referenced this issue Sep 7, 2023
We use `UnixStream::pair()` a few times and reimplement binary ser/de
each time. Add an abstraction that does the serde steps (`DeSerialize`) and
buffer ceremony (`BinPipe`) for us.

Fixes trifectatechfoundation#471.
@pvdrz pvdrz closed this as completed in #741 Sep 7, 2023
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.

1 participant