-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use serde
exclusively for serialization
#109
Comments
I don't recall any other reasons.
IMHO benefits outweigh this minor inconvenience. To my best knowledge there are few adopters of
So this is a breaking change in terms of serialization behavior, but not for the clients that implement their own serialization format (e.g. serialize into raw bytes, then serialize into base64 in the client). Do you think it would be possible to use
I think |
No, for them too, since the binary format will change as well.
Unfortunately it does not change |
Some specific things to consider in relation with this:
|
Currently we have a two-step system:
umbral
objects are serialized manually as byte blobs (withSerializableToArray
trait) and then the result can be (optionally) serialized withserde
(to enable composition innucypher-core
). Originally, this choice was made for the following reasons:ByteStringSplitter
(not important anymore)serde
can handle that, for certain formats)serde
)I don't think there was anything else, was there?
So I think it might be the time to retire
SerializableToArray
/DeserializableFromArray
and just useserde
. The upside is significant code simplification and less boilerplate when adding new structures (which I bumped into when working on #107). The downsides are:nucypher-core
will have to be bumped.serde
does not support constant-sized arrays, so every byte blob (curve point, hash, or signature) will have its length serialized too.umbral
is not particularly useful without it) will have to useserde
and a crate for whatever format they use, which are somewhat heavy dependencies.Speaking of the last point, we might as well just make
serde
a mandatory dependency (this will help avoid some problems with documenting theserde
trait support, too).Also this will resolve #95 - we will just use hex for small objects and that's it.
@piotr-roslaniec, @jMyles, @KPrasch, @theref - thoughts?
The text was updated successfully, but these errors were encountered: