User avatar
polyproto federation protocol polyprototrans @polyproto@amazonawaws.com
1w
A very large refactor was just merged into the polyproto Rust SDK crate! Work on this commenced on Jan. 31st and includes over 40 commits, which were squashed down to 10 commits in the end. neobot_melt_3

74 files were changed, +3189 lines added and -3646 lines removed (457 lines less, in the end).

Why is this cool?

Well, first of all, finishing off on something you've worked on for almost a month is always cool!
blobcat_amused ​:neobot_stretch_down:​
neobot_stretch_rightneobot_stretch_hneobot_stretch_hneobot_stretch_dl
But also, the reason for this refactor were developer UX issues I have noticed while working on the polyproto-core home server "sonata". I noticed, that the crate was written in such a way, that finding out whether any specific certificate was an actor ID-Cert, a home server ID-Cert, or just a plain invalid certificate required a
lot of additional work on the developers' end. What this refactor did, is essentially remove generic "ID-Certs" from the library in favor of two new, more specialized/focused types: "IdCertActor" and "IdCertHs", representing actor and home server certificates respectively. Now, if you are coding and have a IdCertActor metaphorically in front of you, you can be sure, that that ID-Cert has all the specified criteria that an ID-Cert for an actor has to meet, as per the specification.

codeberg.org/polyphony/polyproto-rs/pulls/95