Replies: 5 comments 9 replies
-
I approve of this question @RReverser :) |
Beta Was this translation helpful? Give feedback.
-
One I can think of off the top of my head is that deku supports (focuses on?) bit-level read/writes while binrw seems to operate at byte level only, but beyond that they feel pretty similar, so would love to learn more about differences from someone more knowledgeable. |
Beta Was this translation helpful? Give feedback.
-
It is difficult for me to provide an accurate comparison because I (1) am an obviously biased source, and (2) have not really used deku since I found its fundamental design choice to use slices instead of streams to be a fatal error. Hopefully others will be able to provide corrections and additions so this can be a more fair comparison.
There are probably many other subtle differences, and some places where Deku probably does things better (it probably has better performance since it doesn’t seem to do much state tracking for error reporting, and it operates directly on memory slices instead of having an indirection of the stream), but a substantial amount of work has gone into trying to make binrw a best-in-class library and so I think the comparison reflects that. [0] If binrw ever uselessly points to its derive when an error occurs, it is a bug that should be reported :-). |
Beta Was this translation helpful? Give feedback.
-
Probably unrelated, but would like to know if this will be helpful to either of the crates - rust-lang/rust#89517 trait std::os::unix::fs::FileExt {
// Existing methods: `read_at`, `read_exact_at`, `write_at`, `write_all_at`
fn read_vectored_at(&self, bufs: &mut [io::IoSliceMut<'_>], offset: u64) -> io::Result<usize>;
fn write_vectored_at(&self, bufs: &[io::IoSlice<'_>], offset: u64) -> io::Result<usize>;
} |
Beta Was this translation helpful? Give feedback.
-
I think the major operational difference between the two is in that Deku runs async while binrw does not - writing |
Beta Was this translation helpful? Give feedback.
-
Couldn't help but notice a lot of similarities, at least in terms of goals if not exact design, with a project I saw & used in the past - deku by @sharksforarms.
The more the merrier, but I was wondering if there's a comparison between the two somewhere and description of what binrw is trying to do differently?
Beta Was this translation helpful? Give feedback.
All reactions