this post was submitted on 21 Jun 2023
2 points (100.0% liked)
Lemmy Support
4661 readers
38 users here now
Support / questions about Lemmy.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I've been working with the rust version of the API, and I can't really say I'm surprised. It's going to be sensitive to any fluctuation in type, and they probably don't want to inflate API versions every time they make a small change.
At least the compiler will tell you really quickly what's wrong and where to get it fixed. For most people, API wrappers will probably handle updating for the changes anyway.
Yeah the rust API also seems to be sometimes re-using database types in their structs vs creating new types just for the API, which is only going to make that problem worse.
I guess I should have checked if there was a library for it first - best of luck to any library writers trying to handle supporting dozens of minor releases though, sounds painful.
That's correct, they're the same datatypes the server uses all over. Though, I don't think keeping it up to date would be that bad unless they seriously change things around all at once. Particularly if you encapsulate the data well for the end library user.
My project is making wrapper libraries around all of the types and implementing things based on that.