-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fork of this crate #2
Comments
I'm glad that you found it helpful, and quite surprised that you find it not "clean and Rusty" - I do care about that. Could you point me at what exactly you found unclean? I'd prefer not to create too many similar crates doing the same thing, so could we join forces? Note that I'm already using my crate in production, so I will have requirements on it working. |
This all are my personal opinions:
I don't fell |
I am not sure 4 is correct but in 0.1 you can't use A::from_bytes::(&bytes) since |
Overall it looks like your crate is better. I will consider deprecating mine in favor of yours, but I have some much more important things to do right now. |
Hi, I'm currently looking up smol and simple crates for packing and unpacking Structs. What is the case with this and the fork? I think it would help to have less but therefore maintained crates for this. So, is deprecating still an option? I'm somewhat baffled that it took me more than an hour to just find all viable options for a small, maintained, safe struct packing/unpacking/serialisation/whatever lib that lets me directly control the bytes in the output (opposed to, let's say bincode). |
Based on #2 I decided to encourage people to use `endian_codec` instead, without fully abandoning my crate. This commit informs people about it.
I guess you got the impression that this crate is unmaintained due to lack of commits over a long period of time. I understand that and think it might be misleading way of assessing maintenance. The crate works well for me and up until this point I got zero feedback on what to improve. That could mean:
I'm a bit sad there wasn't a tighter cooperation from @xoac, but he has all the right to make his own crate and I'm glad he made something that looks better. I updated the README with this information. I'm keeping this crate and repository available, but encourage people to use |
So as a final step I decided to properly document every change that I'd like to see in my crate, if it's ever revived. This allows any contributor who can't use I consider this issue resolved now, but let me know if you have any ideas about what else could be done about it. |
@Kixunil I am open for cooperation. All crates are has major version set to 0. So deprecating crate is not a problem especially if there will be replacement. |
First of, @Kixunil: Thank your for the excellent answer, you are, indeed, right regarding my perception. I too think it would be nicer to have two competent people providing one well working crate. I would love to see your efforts combined in one crate, but that's up to you. @xoac Just to put it: IMHO the name of your crate is quite misleading. Endianness is just something which one has to think about while packing and unpacking structs. In my perception, the endianess handling is a detail, and packing/unpacking structs is the main issue that your crate solves. The question of endianness arises from its own. I would never imagine your crate to do something actually related to struct packing/unpacking just from the name. When I first read about it, I was rather confused as to why you call it codec. I do not perceive the order of bytes in integer to be a sufficient transformation of data for it to be actually a encoding/decoding process, as it may even happen that the data is not at all changed (if endianness of machine matches that of the format specified). I'm aware that technical this can be considered a codec, yet probably more people who hear about codec are more likely to think of advanced codes, like media codecs. |
@wucke13 fell free to request better name. I am not native and I tried my best. I don't think endian is misleading in this name. Since I am working with device that send me a raw bytes (C struct with codec is used for example by tokio-util It do a simple tasks:
There is no information about it should be complicated transformation or not. This is way I have chosen endian_codec |
What about Abstracting endianness should be in any similar lib - always, because otherwise you would end up with a set of different codecs for different machines generated from the same code which obviously is bad. I absolutely support your claim that it is important, I just wouldn't put it in the name for the same reason that I prefer 'car' over 'wheel-car'. The argument via Tokio is good, indeed. |
@wucke13 In most cases abstacting endianess is hidden in my crate is not: use endian_codec::{PackedSize, EncodeLE, DecodeLE};
// If you look at this structure without checking the documentation, you know it works with
// little-endian notation
#[derive(PackedSize, EncodeLE, DecodeLE)]
struct Version {
major: u16,
minor: u16,
patch: u16
}
If you want to discuss rename of |
You both raised some good points. I'm actually interested in the name. :) But yes, let's move over there. FWIW, I'd love to see an implementation for enums (using a tag), I even wanted to implement it here, just didn't have the time. |
One last thing you two could help me with: I decided to write a general statement explaining how I maintain my stuff and plan to attach it to all my non-dead projects. It'd be nice to have some feedback on whether the statement is understandable and if it should contain more information that'd be needed for people considering use of my code. https://gist.github.com/Kixunil/f82ec29df925f7cf49884d207d07e904 Thank you in advance! |
I use maintenance label in Cargo.toml. example
But adding additional note to a README.md is great option since a lot of people claim that labels are useless. I would love to see that note for every label in my template. |
Hmm, I tried the maintenance label before and it didn't seem to work. I got some warnings. Maybe I was doing something wrong? If it works, it pretty much means many of my crates are |
@Kixunil Disclaimer: I'm not a native speaker.
I would not instruct people to ask for change unconditionally.
This doesn't make a whole lot sense to me, grammatically. How about this:
Other than that, these two stuck out to me:
|
I was inspired by this crate to create similar one - generally to learn using derive. You can check it out endian_codec
The text was updated successfully, but these errors were encountered: