Hello,
I've just recently come across rustyknife, and it looks really nice :) I'm considering dropping my own SMTP parsing library in favor of rustyknife, as you appear to have already implemented things that were in the long list of things I still have to do.
This being said, I wonder a bit about the scope of rustyknife: is it's only aim to parse the things that are useful for an SMTP receiver (as appears to be currently implemented), or would you be open to (PRs) adding support for parsing SMTP replies, as well as generation of SMTP commands and replies based on the data?
Also, my current code, while not at all able to do all the parsing you do, makes sure it doesn't allocate. How would you feel about making the parsing commands generic on their types, so that it would become possible to use Bytes instead of &[u8] and String? The drawback of this approach is, that in the &[u8] approach, the return value would be eg. Email<Vec<u8>> instead of Email, and to get the current Email one would have to call .to_string() or similar. The idea is that the data would just be validated at parsing time, and then when someone wants to actually recover the data in a format that's not just for relaying to another SMTP server, it would get converted and allocated.
As all of that would certainly result in pretty wide-spread changes, I'd like to get feedback from you before starting work on this :) (also, full disclosure: I can't guarantee I'll be timely to deliver the API changes -- the ones that interest me most right now are the SMTP parsing series, though they're also the ones I've actually already implemented with my noalloc parser I still haven't upgraded from nom3; so I'd most likely be pretty fast in doing the port of those, but would also likely be much slower to port the other parsers to the new generic API)
So… what do you think about all these ideas? Do you think they are in-scope or out-of-scope for this project?
Hello,
I've just recently come across
rustyknife, and it looks really nice :) I'm considering dropping my own SMTP parsing library in favor ofrustyknife, as you appear to have already implemented things that were in the long list of things I still have to do.This being said, I wonder a bit about the scope of
rustyknife: is it's only aim to parse the things that are useful for an SMTP receiver (as appears to be currently implemented), or would you be open to (PRs) adding support for parsing SMTP replies, as well as generation of SMTP commands and replies based on the data?Also, my current code, while not at all able to do all the parsing you do, makes sure it doesn't allocate. How would you feel about making the parsing commands generic on their types, so that it would become possible to use
Bytesinstead of&[u8]andString? The drawback of this approach is, that in the&[u8]approach, the return value would be eg.Email<Vec<u8>>instead ofEmail, and to get the currentEmailone would have to call.to_string()or similar. The idea is that the data would just be validated at parsing time, and then when someone wants to actually recover the data in a format that's not just for relaying to another SMTP server, it would get converted and allocated.As all of that would certainly result in pretty wide-spread changes, I'd like to get feedback from you before starting work on this :) (also, full disclosure: I can't guarantee I'll be timely to deliver the API changes -- the ones that interest me most right now are the SMTP parsing series, though they're also the ones I've actually already implemented with my noalloc parser I still haven't upgraded from nom3; so I'd most likely be pretty fast in doing the port of those, but would also likely be much slower to port the other parsers to the new generic API)
So… what do you think about all these ideas? Do you think they are in-scope or out-of-scope for this project?