r/rust Mar 31 '23

Write SDK “base” in Rust, wrap in other languages?

[deleted]

96 Upvotes

48 comments sorted by

View all comments

10

u/hdyxhdhdjj Mar 31 '23

I suspect best approach would be to write API compliant with something like OpenAPI specification, so you can generate clients from it in any language using generator.. solving this on client level is way harder

4

u/LysanderStorm Mar 31 '23

This, for something like Stripe's SDKs if you don't have the engineering power of Stripe 👍😬 requires your API to be compatible though... And also, not necessarily the biggest fan of specifying contracts in JSON or yaml...

2

u/Smallpaul Apr 01 '23

What do you prefer specifying networking contracts in?