wireguard-uapi-rs
wireguard-uapi-rs copied to clipboard
Add key type to replace naked arrays
This commit replaces the ever so prevalent 32-large array of u8s with a tuple struct and some aliases for struct fields. Ideally, those aliases would be strongly-typed, but sharing the conversion logic from u8 slices becomes painful.
I believe this is an API change, so we'll have to release a new major version once this merges. I saw #25 as well, but did you want to get other breaking changes in?
I have nothing else in queue right now.
I created the PRs to see what you thought of the changes, but, now that I think of it, the API breakages can’t be avoided (and adapting existing code will be more shit work for little added benefit for most, I imagine).
It will be a bit of shit work, but that consequence is also a bit on me for not abstracting these naked key types in the first place. 😞
There probably isn't any particularly best right time to merge this. Feel free to hit the merge button when you think is best.
All right. I’ll integrate the changes into my code to see if I had managed to forget something and then merge.