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

Using traits ans structures from the standard library #19

Closed
ghost opened this issue Dec 11, 2014 · 2 comments
Closed

Using traits ans structures from the standard library #19

ghost opened this issue Dec 11, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 11, 2014

capnproto-rust redefines some traits / structures that seem to exist in the standard library, such as BufferedReader and BufferedWriter and the corresponding wrappers, but with a few changes.

Is there a particular reason to redefine those traits and structures, such as an insufficent API or too much API instability? Or is it there more for legacy reasons?

@dwrensha
Copy link
Member

The standard library's API is insufficient. The packing algorithm in serialize_packed makes heavy use of the BufferedInputStream::get_read_buffer() and BufferedOutputStream::get_write_buffer() methods to directly access the buffered bytes.

I'd like to use a safer and more idiomatic API here, but it's unclear whether that's possible without sacrificing performance.

@dwrensha
Copy link
Member

Thanks to #41, we now do use the standard traits.

dwrensha added a commit that referenced this issue Feb 17, 2018
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